Graph API fails to work on Teams in SPFx webpart

Graph API fails to work on Teams in SPFx webpart

Just to give you a background, i was working on the SPFx webpart which needs to be available on Teams tab. I was fetching values through Graph API.

Though the webpart working well on the SharePoint, but fail to load on the teams. I stumbled to this Git hub discussion, https://github.com/SharePoint/sp-dev-docs/issues/2521

and there was configuration setting suggested in this comment (https://github.com/SharePoint/sp-dev-docs/issues/2521#issuecomment-487962439)

  • Before starting following steps, user needs to be Global tenant admin
  • Go the the office admin section, click on admin.
  • This will take you Microsoft 365 admin center, click on Azure Active Directory.
  • On the Azure Active Directory admin center, click on Azure Active Directory–>App Registration
  • Or you can go directly through this url
  • Under the all Application tab, find “SharePoint Online Client Extensibility Web Application Principal”, click on the application.
  • Click on Manifest, Before making any changes take the copy of Manifest json
  • Now replace the following json with PreAuthorizedApplication (if there is no value associated),

“preAuthorizedApplications”: [
{
“appId”: “00000003-0000-0ff1-ce00-000000000000”,
“permissionIds”: [
“{SpFx packageID}”
]
}
],

Hopefully this will resolve the issue.

Happy Teaming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s