AcquireOBOToken failing when editing SharePoint page within Teams tab #9767
Labels
Needs: Triage 🔍
Awaiting categorization and initial review.
sharepoint-developer-support
sharepoint-developer-support
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
MS Teams for web and SPFx
Describe the bug / error
When viewing a SharePoint page within an MS Teams tab, http requests made after switching the page to edit mode are failing
Requests are made using the MSGraphClientFactory provided in the @microsoft/sp-http package.
This package automatically acquires a token from the SharePoint api endpoint AcquireOBOToken providing a clientId. The problem is that the clientId changes to
08e18876-6177-487e-b8b5-cf950c1e598c
(SharePoint Online Web Client Extensibility) when you edit the SharePoint page. This results in the token aquisition failing (Similar to this bug)Upon refreshing the iframe, the web part displays correctly again.
I have tried the steps outlined in this bug to re-generate the secret
Steps to reproduce
Create a standard ReactJS SPFx webpart
Install @microsoft/sp-http library in the package
In the React component, make a request to the Graph API
Build, Bundle & Package the solution and upload to the app catalog
Add the web part to the homepage of a SharePoint site connected to a Teams channel
View the page in MS Teams and observe expected behvaiour - the email address is displayed
Expected behavior
The request should continue to work when editing a page
The text was updated successfully, but these errors were encountered: