Forum Discussion
SharePoint REST API - Get StorageQuotas from tenant admin site using managed identity
Thank you for your reply NicolasKheirallah, helping me out.
I have been struggling for several hours to make this work now. On a demo tenant I have been able to make this work just fine and let Postman retrieve the list items of a list on a site collection, just for testing. Making use of the following article, also elaborating on SharePoint App-only permissions: https://global-sharepoint.com/sharepoint-online/in-4-steps-access-sharepoint-online-data-using-postman-tool/?expand_article=1
However, I am not able to retrieve the StorageQuotas from the tenant admin site using the Bearer access token. When I do so, I get the following error message: "{"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."}"
Articles I found on the web seem to point to inappropriate set scope or incorrect permissions
I have followed the steps in your article to generate a new application, and for this test I had used the following permissions: <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />.
In Postman I have retrieved an access token as described here: https://global-sharepoint.com/sharepoint-online/in-4-steps-access-sharepoint-online-data-using-postman-tool/?expand_article=1 and performed the request with in the Headers a key named 'Authorization' and for value 'Bearer <access token>'.
- JoostvdLindenOct 19, 2023Copper ContributorYes that is correct Nicolas. Unfortunately it didn't seem to help so far...