sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Graph call to /me endpoint from SPFX in SharePoint mobile app returns data for other users

Open michelsmit opened this issue 7 years ago • 11 comments

gt.zip

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

We have applied the fix as described in #2521 for consuming the Graph API in the SharePoint mobile app (using custom SPFX webparts).

We're expecting to see the data of the logged in user in the mobile sharepoint app, e.g. calling the /me endpoint from an SPFX webpart should return data for the logged in user.

Observed Behavior

We're observing now when we're calling the /me endpoint of Graph, we're seeing the data from another user. When refreshing the page, it shows data of (yet) another user again. This also occurs with calls to onedrive and calendar endpoints.

This means people get to see files and agenda items for other users in the web parts... And this is a huge security issue.

We're able to replicate the issue on three different tenants. @lucabandMSFT can this have anything to do with the fix in the manifest file as suggested in #2521 ?

Steps to Reproduce

See attached hello world webpart and screenshots. Both screenshots were taken a second after each other on the same device, in the same app, logged in as the same user. Screenshot_20190617-175720_SharePoint Screenshot_20190617-175733_SharePoint

michelsmit avatar Jun 17 '19 16:06 michelsmit

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Jun 17 '19 16:06 msft-github-bot

Hey @michelsmit, thank you for point that to us. Just one initial question: is the current behavior you are experiencing happening ONLY in the mobile application? Or you are experiencing the same on the desktop web browser? Thanks, Luca

lucabandMSFT avatar Jun 18 '19 15:06 lucabandMSFT

Hi @lucabandMSFT the issue ONLY applies to the mobile app. Mobile browser and desktop browsers are working fine. We've also managed to get Fiddler intercept requests between the app on an iPad and the tenant and graph. What we're observing is the Graph calls can have a bearer token for other users which haven't logged in on the iPad ever before.

Also, it seems the problem is occurring when several users are using the app at the same time (on different devices with different accounts though).

From the app several calls to /_api/Microsoft.SharePoint.Internal.ClientSideComponent.Token.AcquireOBOToken endpoint are made, and this endpoint seems to return access tokens for other users as well...

michelsmit avatar Jun 18 '19 16:06 michelsmit

@michelsmit Can you please send me (direct message) your tenant url and SPRequestGuid header values for access token requests that were retrieved for the wrong user? This call should start failing in the next couple of minutes.

ghost avatar Jun 18 '19 17:06 ghost

@lahuey how to DM you? I notice the calls to AcquireOBOToken are failing now, no result is returned. I would like to send you these requests and requests from this afternoon...

michelsmit avatar Jun 18 '19 18:06 michelsmit

You can send me an email at [email protected]

ghost avatar Jun 18 '19 18:06 ghost

You can send me an email at [email protected]

You've got mail ;)

michelsmit avatar Jun 18 '19 18:06 michelsmit

hey @michelsmit , a fix for the issue is now in place and the capability has been re-enabled. can you please check if you are experiencing the same issue?

thanks a lot!

lucabandMSFT avatar Jul 01 '19 15:07 lucabandMSFT

@lucabandMSFT It seems resolved now! Great job ;)

michelsmit avatar Jul 05 '19 09:07 michelsmit

@michelsmit , thanks a lot for confirming it. I'm closing this issue now.

lucabandMSFT avatar Jul 05 '19 16:07 lucabandMSFT

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 24 '20 06:01 msft-github-bot