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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Get permissions for a specific list item

(0) ShareShare
ReportReport
Posted on by 260

Hello

 

I have 2 lists

 

Site

Site Diary Entries

 

When a new Site Diary entry is added I need to assign the same security to the new item as the corresponding site has

 

I know how to break permissions and set them

 

Can someone help with how I get the users/groups that have access to the associated site list item please?

 

Paul

I have the same question (0)
  • Expiscornovus Profile Picture
    32,912 Most Valuable Professional on at
    Re: Get permissions for a specific list item

    Hi @paulinuk,

     

    You could retrieve the RoleAssignments and the related RoleDefinitionBindings to get the ACL of the item.

     

    Below is an example of that approach:

    The screenshot is of a file in a document library. But for a list item in a list the request should be the same.

     

     

    _api/web/lists/getbytitle('ListName')/Items(ID)/RoleAssignments?$expand=Member/users,RoleDefinitionBindings

     

     

     

    roleassignments_usersexpand.png

  • paulinuk Profile Picture
    260 on at
    Re: Get permissions for a specific list item

    Ok thanks 

     

    What’s the best way to copy these permissions from this api call to destination? Ie the site diary entry

  • Expiscornovus Profile Picture
    32,912 Most Valuable Professional on at
    Re: Get permissions for a specific list item

    Hi @paulinuk,

     

    From that output you should be able to Select the principalid & roledefid which you can use into requests with the addroleassignment method.

     

    Let me know if you need an example of that approach.

  • paulinuk Profile Picture
    260 on at
    Re: Get permissions for a specific list item

    Hello 

     

    An example would be great please!

     

    Paul

  • Expiscornovus Profile Picture
    32,912 Most Valuable Professional on at
    Re: Get permissions for a specific list item

    Hi @paulinuk,

     

    Below is an example. 

     

    1. The Select uses the value of the RoleAssignments GET request I shared earlier in this thread.

     

    2.  In the mapping of the Select action I retrieve the principalid via this expression

    item()['Member']['Id']

     

    and the (first) roledefid via this expression

    item()['RoleDefinitionBindings'][0]['Id']

     

    3. In an apply to each loop I am looping through the principals from the Select Output. For each item the AddRoleAssignments is used to set permission for the target item. In that uri I refer to the 

    item()['principalid'] & item()['roledefid'] from the Select Output with expressions.

     

    This step assumes that you already have broken inheritance in a previous action (action number 2 in my screenshot).

     

    addroleassignments.png

  • paulinuk Profile Picture
    260 on at
    Re: Get permissions for a specific list item

    Thanks a lot for this! I will check it when I get back to the office

     

    Am I right in assuming that this flow would be triggered if the security of a list item in my Site list is changed?

     

    When the security of a site is changed, I would need to remove all permissions of any site diary entry linked to that site and reapply the permissions from the site if that makes sense?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard