spfx-msgraph-peoplesearch icon indicating copy to clipboard operation
spfx-msgraph-peoplesearch copied to clipboard

Being redirected to the SPFx redirect page: SPFx Single Sign On Redirect

Open StefanBreedveld opened this issue 11 months ago • 5 comments

Since a couple of weeks I am being redirected to the SPFx Single Sign On Redirect Page when trying to access a page where a peoplesearch webpart is set. The redirect page needs to refresh two times before users can read the page.

In the browser tabname the following title is shown -> SPFx Single Sign On Redirect Page.

I am automatically taken to this page: [https://mytenant.sharepoint.com/_forms/spfxsinglesignon.aspx#code=...........

I've tried this on 4 different browsers (normal and incognito modus) all resulting in the same issue.

StefanBreedveld avatar Feb 27 '24 08:02 StefanBreedveld

Hi @StefanBreedveld

This has nothing to do with my web part, and is essentially the only way SPFx can workaround the issue of third party cookies being blocked by your web browser. @estruyf has written a good explanation about this: https://www.eliostruyf.com/browser-refreshing-sharepoint-page/

YannickRe avatar Feb 27 '24 19:02 YannickRe

Hi @YannickRe

Thanks for you explanation. I still have a question about the API settings in the SharePoint Admin Center. As referenced in the blog above (@estruyf). iIt describes 2 solutions to solve this problem. I approved the permission scope in the API access page in the SharePoint Admin Center, but the page keeps refreshing 2 times.

Is solution 1 (setting User.Read.All in API access settings) no longer sufficient and are both solutions necessary to prevent the refresh in the browser?

api_access

StefanBreedveld avatar Mar 04 '24 09:03 StefanBreedveld

@StefanBreedveld if you can try to intersept the redirect (via Fiddler, or any other proxy tool), you can see what permission scopes are requested. Might be a scope is missing.

estruyf avatar Mar 04 '24 16:03 estruyf

Thanks @estruyf - I have no experience with fiddler but I will look into this.

@YannickRe aren't there other people reporting this problem? This issue only occurs with the peoplesearch web part on all MS365 tenants where we deployed it. My feeling is that Microsoft has changed something in the background that is now causing this problem...

Thanks anyway for your help!

StefanBreedveld avatar Mar 14 '24 08:03 StefanBreedveld

@StefanBreedveld I've just verified the web part for you. Make sure you have the User.Read.All Microsoft Graph permission scope configured and admin consented on the SharePoint Online Client Extensibility Web Application Principal app registration in Microsoft Entra ID.

image

estruyf avatar Mar 14 '24 13:03 estruyf