cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ethanrut
Helper I
Helper I

Graph API Call Forbidden Even Though it Doesn't Require Any Permissions?

I am trying to get an Excel Table using a Graph API call.  When I try to GET my excel table, it says FORBIDDEN. Why is this forbidden? Do I need to add a redirect URI? 

I turned this to "Yes"

Snag_87ea02f7.png

Snag_88025cbb.png

 

Snag_c407d19.png

Snag_c40c31b.png

Snag_c40eede.png

I tried using the me/drive but when I do it gives the error of "Unable to retrieve user's mysite URL." Here is my URI

https://graph.microsoft.com/v1.0/users(MYUSERID)/drive/root/workbook/worksheets(MYWORKSHEETID)/tables(MY TABLE ID)/rows

 

Snag_c412c55.png

 

Why is my access denied? Do I not have permissions? Or am I doing something wrong? 

 

I tried a different method using POST, and heres the error message I am getting now, I think my Bearer token might be wrong. 

 

The provided input content is not valid: 'The provided content-type header value 'Bearer ********** is not well formed.'.

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

Hi @ethanrut 

 

When you created the app registration in the Azure AD, have you assigned the below permissions? 

yashag2255_0-1601009420315.png

Source

 

Also, in the HTTP action, if you select the authorization as Active Directory OAuth, you can directly provide the tenant, application ID and the secret in one action only. You will not have to pass the token or have multiple actions for authorization purpose. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255  thanks for the reply! I did see that online but how come it says Not supported for Application and Delegated (personal)?

Here is my supported account types, and my API permissions. I know I have way too many but I am trying to get this to work.

 

Snag_f99b4fa.png

Snag_f99d41a.png

yashag2255
Dual Super User II
Dual Super User II

Hi @ethanrut 

 

The permissions look good to me but there must be some small mistake which is causing the issue. 

 

This is the MS Graph explorer: https://developer.microsoft.com/en-us/graph/graph-explorer

 

You can directly authenticate with your account and provide the permissions and test your request here. Can you try doing that once and see if you are able to access the file using the get tables api request? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255  yes this works for me in Microsoft Graph. I first tried it in Microsoft Graph which lead me to trying it in Power Automate. Do I have to be an admin to do this? Do I have to have certain permissions as a user for me to accomplish this? 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (56,699)