Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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.

 

 

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at
    Re: Sharepoint Permissions

    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..

  • Verified answer
    Vaughn1234 Profile Picture
    15 on at
    Re: Sharepoint Permissions

    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
    Re: Sharepoint Permissions

    @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.

  • Vaughn1234 Profile Picture
    15 on at
    Re: Sharepoint Permissions

    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
    Re: Sharepoint Permissions

    @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
    Re: Sharepoint Permissions

    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
    Re: Sharepoint Permissions

    @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
    Re: Sharepoint Permissions

    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
    Re: Sharepoint Permissions

    @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?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow