cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hayes3d
Advocate IV
Advocate IV

Using Flow to get OneDrive files via Graph

I am attempting to use a Power App to call a flow to get their own One Drive files via Graph API.

 

  • We have the Graph API registered as an application.
  • I can use Flow to call Graph and get groups, users, tenant SKUs, etc via the same method without issue.
  • I can use Graph Explorer to do this without any issues.
  • For "Me" I have passed both my GUID and UPN/Email with the same results
  • Result is always a 403. Wondering if this is an app registration security issue? You can view the current permissions in the image below:
    2019-12-13_10-10-32.png

2019-12-13_10-03-29.png2019-12-13_10-05-06.png

 

 

 

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @Hayes3d ,

 

It seems that your permissions are satisfactory, and you have passed the Graph Explorer test.

From your configuration, it may be that the PowerApps button you use as a trigger has caused such problems.

 

When using the PowerApps button as a trigger, the context will change. The user info obtained in the Flow is the user who triggered the Flow(the user who clicks the PowerApps button), so the user info here changes dynamically. Maybe the current user does not have sufficient permissions to obtain the file.

 

Please check this similar thread:

https://powerusers.microsoft.com/t5/General-Power-Automate/Breaking-access-role-inheritance-error-wi...

 

You can try to use the Manual button as a trigger first, and then configure the fixed credentials in the HTTP action to see if similar issues still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Sorry I should have specified how I triggered it. I can manually put in my own OneDrive, which both my onmicrosoft admin acct and regular account have access, and then trigger it through a test or from PowerApps and I get the same error either way. I tested with 2 separate sessions and both have access to my OneDrive through the browser. Both worked using Graph Explorer. Just not working from Flow. But if I get rid of the "drive/root/children" the flow works just fine to get my info. So I know everything should be setup correctly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,351)