YannickRe / spfx-msgraph-peoplesearch

Show and search users from your organization with an SPFx web part, through Microsoft Graph.
40 stars 33 forks source link

Token request previously failed #87

Closed ChristianOtte closed 1 month ago

ChristianOtte commented 1 month ago

Hi

I've been using this amazing people-search, but from today it suddently return this error "Token request previously failed"

I've tried this command Grant-PnPTenantServicePrincipalPermission -Scope "User.Read.All" -Resource "Microsoft Graph" but stil does not work.

The SharePoint Online Client Extensibility Web Application Principal got user.read.all Tried removing the webparts from my app catalog and uploaded the newest version, not luck on that.

Also tested in a different test environment, but this issue persists

Do you have a suggestion what might go wrong here?

ChristianOtte commented 1 month ago

I solved the problem, combining 2 different option Step 1 - https://github.com/SharePoint/sp-dev-docs/issues/9099#issuecomment-1701406090

  1. delete the secret from SharePoint Online Client Extensibility Web Application Principal
  2. create a new secret via sharepoint admin center Api Access

Step 2 - trial and error

  1. Go to permissions for SharePoint Online Client Extensibility Web Application Principal
  2. remove and add User.Read.All (delegated)
  3. grant consent

Finally i worked again