0
votes

I want to be able to list my SharePoint files using a token obtained from AAD app. So far I'm not getting any authorisation errors - so not like in this question and I'm able to make the call correctly, however I'm seeing different results for the same account through Microsoft's Graph Explorer and what I have. I can see and list my files / drives in the Microsoft Graph Explorer using the url:

https://graph.microsoft.com/v1.0/sites/mytenant.sharepoint.com/drive/root/children

This however doesn't work with the AAD app that I have which I've requested the following accesses from Microsoft Graph API

enter image description here

I'm guessing either the graph tool is enabled with some features that the rest of us doesn't have, or I'm requesting the wrong set of permissions. Any ideas to what I might be doing wrong?

1
Could you share the differences between the Graph Explorer and your API calls. You don't really leave us with much to work off of.Shawn Tabrizi
Sure - the Graph API Explorer would actually list the files, but my own access with my AAD token was showing up no files. I have solved this problem now, it looks like you needed to disable and re-enable the aad app for the account if you were changing permissions. I was expecting to get the prompt again but I didn't get prompted.Mavi Domates
Just an FYI, Graph Explorer uses the exact same endpoints and permissions.Marc LaFleur

1 Answers

0
votes

If you are adding permission(s) to your application, users will have to consent even if they’ve already done so previously.

And you doesn't need to disable and re-enable the aad app for the account if you were changing permissions. As an administrator, you can consent to an application's delegated permissions on behalf of all the users in your tenant. The easiest way you can do this from the Azure portal from your application page. From the Settings blade for your application, click Required Permissions and click on the Grant Permissions button.