web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint Permissions
Power Automate
Answered

Sharepoint Permissions

(0) ShareShare
ReportReport
Posted on by 15

So I made a workflow that creates a team, adds people to it, creates one folder for every user and is then supposed to give every user only access to their own folder and not the others.
I am using a HTTP request to first break inheritance on the folder, and then give the user permission with "Grant access to an item or folder". It actually looks like it should work. When I log into Sharepoint with my admin account and check the permissions for the folders it all looks exactly how it is supposed to. The problem is, as soon as I attempt to log in on one of the users, the permission is immediately removed. If I check again on my admin account, its just gone.

I can't explain why this is happening and hope maybe somebody has an idea and could help me. Thanks in advance.

 

 

Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @Vaughn1234  the permissions shouldnt get automatically removed, thats not how SharePoint works, can you share the screenshots of permissions page logged in with admin before you are logged in with other user and then logged in with admin after you are logged in with other user?

  • Vaughn1234 Profile Picture
    15 on at

    Yes of course. 

    Screenshot by Lightshot (prnt.sc)

    This is before I log in on the account that has permissions and this:

     

    Screenshot by Lightshot (prnt.sc)
    is after.

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @Vaughn1234  so that user to whom you are assigning permissions from flow using grant permission got removed? Can you also share the screenshot of the flow with actions expanded? Are you waiting for flow to complete before checking the permissions?

  • Vaughn1234 Profile Picture
    15 on at

    Vaughn1234_0-1631521353438.png

    Yes exactly. The account has access to the folder until the moment I log in with it. And yes, I was waiting for the flow to be completed.

    In the screenshot you can see me get the metadata of the folder to retrieve the ItemId. Then I break inheritance from the library with the HTTP request. After that I grant access to the folder to the correct account. I loop through this multiple times but the behavior is the same whether I do it once or multiple times

     

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @Vaughn1234  On manage access section you will see Advanced link at the bottom can you check the permissions on that page as well.

  • Vaughn1234 Profile Picture
    15 on at

    Yes no problem. First one is before logging in, 2nd one after

    Vaughn1234_1-1631533764404.pngVaughn1234_2-1631533816388.png


    EDIT: The problem also persists when I create a new library and create the folder there instead of using Documents

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @Vaughn1234  so does the permission get removed when user tries to access the folder? I tried implementing your scenario and i didnt face the issue of permissions removed.

  • Verified answer
    Vaughn1234 Profile Picture
    15 on at

    I just figured out the problem myself. I kept creating Azure AD users with the same name every time I ran the flow and deleted them inbetween tests. It seems like that confused Sharepoint and it jumbled up user information and giving permission to either already deleted Accounts of the same name or possibly amalgamations of the deleted and the newly created accounts. When I choose a name for Azure AD that I have not used before (and add a delay to my flow), it works!

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    Understood, yes of if user is deleted from Azure AD, then user will be removed from SharePoint. Generally it is a good practice to deactivate user from AD instead of deleting unless you have strong reason to delete..

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 664

#2
Haque Profile Picture

Haque 460

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard