1

I am trying to install webpart with permissions to users and groups in Microsoft Graph. I use "@pnp/graph" to comunicate with Microsoft Graph API.

 "webApiPermissionRequests": [
  {
    "resource": "Microsoft Graph",
    "scope": "User.Read.All"
  },
  {
    "resource": "Microsoft Graph",
    "scope": "Group.Read.All"
  }
]


I also grant permission in sharepoint admin panel to those permissions. view from sharepoint admin panel

Also in azure active directory I see that I have permissions for both of application.

enter image description here enter image description here


But I still have this error, week ago I was doing the same procedure without any error. view of error

Do you have any idea what I missing?

  • in your config > package-solution.json file, modify or set the value of isDomainIsolated property to false, i.e set it as "isDomainIsolated": false and then bundle and upload the file and check – Gautam Sheth Jun 18 at 17:45
  • This solves the problem :) in my case. – Jarosław Wałach Jun 19 at 6:12
  • cool, have posted that as answer. You can accept it which might help others in the community as well, cheers ! happy to help :) – Gautam Sheth Jun 19 at 13:18
1

Looks like there seems to be some issue going on with domain isolated webparts, for the time being would suggest that you not use that property.

As mentioned in the comments, would suggest that you modify the config > package-solution.json file and set the isDomainIsolated value to false and then bundle, package and upload the solution and try again by approving the permissions.

So, simply open the package-solution.json file and set the value as below:

"isDomainIsolated": false
1

Try to call method getToken with 'https://graph.windows.net' to get the JWT token return tokenProvider.getToken('https://graph.windows.net')

You can refer to these similar situation below:

https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi/issues/19

https://github.com/SharePoint/sp-dev-docs/issues/3102

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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