Reputation: 710
I have a microsoft token that is able to be refreshed successfully, yet when I try to make a basic call that is within one of the scopes authorized, I get a 401. The call is: https://outlook.office365.com/api/v2.0/me and here is the detail back from the server:
I have many users who use this same code pathway just fine right now, but a few users are running into this issue which makes me think it's a configuration issue on their end or something, however the error message doesn't tell us much...Please help
Upvotes: 2
Views: 1741
Reputation: 710
The internal management of scopes within Microsoft has changed for security reasons. We were using scopes such as Mail.Read which are Microsoft Graph scopes, but we were using them to access outlook.com endpoints. Until last week this was allowed, but now it is no longer allowed.
The fix was to prepend https://outlook.office.com so the new scope would be https://outlook.office.com/Mail.Read and this scope format is allowed on the outlook REST API endpoints. Just be careful not to mix graph and outlook scopes as it appears you cannot get a single token that can work for both of those APIs.
Upvotes: 4