cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Dual Super User III
Dual Super User III

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

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!

Highlighted
Helper I
Helper I

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

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

Highlighted
Dual Super User III
Dual Super User III

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

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!

Highlighted
Helper I
Helper I

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

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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Kudoed Authors
Users online (5,688)