Please specify what version of the library you are using: [ 2.0.12 ]
Please specify what version(s) of SharePoint you are targeting: [ Sharepoint Online ]
Hi.
In the custom SPFx solution I'm working on, we occasionally observe this:
This redirect causes https://acme.sharepoint.com/sites/mysite to be loaded twice, which to our users is viewed as a bug/hick-up. As this redirect is related to SSO, it typically seems to happen after a period of inactivity.
After some initial analysis, I believe this is the code line that causes the issue:
await graph.users.getById(emailAddress).memberOf();
Is is likely that this function call is what's triggering the redirect? And if so, is there a way to avoid the redirect, so that the whole page doesn't load twice?
Graph API requires some additional auth code bindings, as Graph is an external resource. Are you sure you're following auth notes? https://pnp.github.io/pnpjs/authentication/client-spfx/#connect-to-graph-as-current-user
Thanks for the link. I see that I didn't have this set up in my project. Added it now, and will check to see if the redirect issue goes away.