4

I've setup a web part with SharePoint framework that requires access to the Microsoft Graph for displaying the recently used files.

I've followed the instruction here: https://github.com/SharePoint/sp-dev-docs/blob/master/docs/spfx/web-parts/guidance/call-microsoft-graph-from-your-web-part.md

I am not using the latest version of adal-angular because it was having timeout issues, it is also said in the guide above to use version 1.0.12 so I am using that version. For doing the component, I inspired myself from the Implicit Flow example: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-aad-implicitflow

My component works fine on the local workbench.

On the SharePoint workbench, I get the following error

Token renewal operation failed due to timeout

When deployed, I ask for a Sign In, which opens a popup window but instead of coming back to the page I was, this popup stays open and that is where I see my recent files.

Am I doing anything wrong? I would like this to work as it does on the local workbench.

7
  • 1
    I asked this recently of other MVPs who are more familiar with SPFx than I am and they indicated it was currently not possible to use the ADAL framework with SPFx.
    – user6024
    Mar 28, 2017 at 16:40
  • Just today I've submitted a PR fixing issue that sounds similar to what you're describing (github.com/SharePoint/sp-dev-fx-webparts/pull/167). Would you mind checking if the latest code fixes the issue for you? Mar 28, 2017 at 19:09
  • @WaldekMastykarz-MVP. I Just tried it and no luck. Here is a screenshot. The window to the right is the one that popped up. It has the id_token defined in the URL. Also, when I signin on the window to the left, there is a refresh happening. Mar 29, 2017 at 17:43
  • Which browser are you using @FrancisFilion? Mar 29, 2017 at 19:56
  • @WaldekMastykarz-MVP Chrome (Stable channel), both normal and private mode. Tested with Firefox and same behavior. Should I try on a non-dev SharePoint site? Could the behavior be different? Mar 30, 2017 at 0:53

1 Answer 1

0

I have been facing the same issue while working and got a work around which is "We can you please try changing Redirect URL to any Classic page".

The problem is while requesting the Access Token from Modern Page, it throws an error. So, I changed the Redirect URL to one of my Classic Page.

I hope, this might work for you as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.