Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ZN4BwvGpLl2AFz8hhM1pZT
Power Automate - Using Flows
Answered

Issue with OneDrive for Business Actions in Power Automate Flow Triggered by different users

Like (0) ShareShare
ReportReport
Posted on 19 Dec 2023 19:12:07 by

Hello Power Automate Community,

I'm encountering an issue with a flow that's triggered by a Power Apps, where any OneDrive for Business action fails when triggered by users other than myself. I'm reaching out for insights or possible solutions from the community.

 

Issue Description

The flow works flawlessly when I, the creator, trigger it from Power Apps. However, when other users initiate the flow, actions such as "Get file metadata" and other OneDrive for Business actions result in "Forbidden" or "Access denied" errors. This suggests a permissions' problem, but it's unexpected because the actions are set to use a specific connection that should not be affected by the user triggering the flow.

For example, here is the same action for 2 runs :

 

The action when another user triggers the flow from Power Apps

2023-12-19 13_33_12-Berrycast - Free Screen Recorder & Sharing Tool.png

 

When the flow is trigger by me using Power Apps (with the same parameters) : 

2023-12-19 13_37_00-Microsoft Power Automate and 11 more pages - ABF - Microsoft​ Edge Dev.png

 

Troubleshooting Done:

  • Confirmed that the OneDrive for Business actions are using the correct connection with appropriate permissions.
  • Ensured that the connection used for this action have write/read access to the necessary files on OneDrive.
  • Double-checked that no user-specific contexts are altering the flow's execution.

 

Questions:

  1. Are OneDrive for Business actions in Power Automate flows supposed to run with the connection's credentials rather than the credentials of the user who triggers the flow?
  2. Is there a setting that I might have overlooked which causes the flow to use the triggering user's context?
  3. Has anyone else experienced similar issues with OneDrive for Business actions in Power Automate and found a resolution?

Your assistance or suggestions would be immensely helpful. I'm happy to provide further details if needed.

Thank you for your time and help!

 

Best regards,

Nicolas

  • Pstork1 Profile Picture
    66,091 Most Valuable Professional on 19 Dec 2023 at 19:55:05
    Re: Issue with OneDrive for Business Actions in Power Automate Flow Triggered by different users

    Giving the users permission to the OneDrive folder and contents should also work.  But the Solution is the better choice since that becomes important if you want to move the app and flow to a different environment also.

  • OpenMindt_abf Profile Picture
    on 19 Dec 2023 at 19:40:37
    Re: Issue with OneDrive for Business Actions in Power Automate Flow Triggered by different users

    Thank you so much for the quick response, I didn't know about this security logics!
    So either all users using the Power Apps should have permission for those OneDrive folders/files, or the Power App and Power Automate need to be put in a Solution and use the "Run Only User" settings to run with the maker's connection. 
    I will try to use a solution immediately!
    Thank you again!

  • Verified answer
    Pstork1 Profile Picture
    66,091 Most Valuable Professional on 19 Dec 2023 at 19:23:11
    Re: Issue with OneDrive for Business Actions in Power Automate Flow Triggered by different users

    1. When you trigger a flow from Power Apps it runs in the security context of the person who triggered it. So no in that case it won't run with the connection credentials.

    2. That is the default setting. If you build the flow and the app in a solution there is a setting on the flow called Run Only User which will let you change the connection to run with the maker's connection, not the security of the person triggering the flow.

    3. See #2. This is the way it operates by default.  Using the steps in #2 you can change it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow
Loading started