Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Grant access to newly created SharePoint List

(0) ShareShare
ReportReport
Posted on by 30

Hi, I'm having problems with a flow. I have a flow that will create a SharePoint list, populate that list based on another SharePoint... last thing I need is to provide access to that SharePoint list.

 

I'm not able to use the drop down to select the List name because it's created during this flow but I've been using "Onboarding [Employee's Full Name]" and that's been working to create it, and code creating columns, and then fill in the list based on another SharePoint List. Below is the step that is failing and the error I'm getting.

 

jacobb3_0-1663246407479.png

 

jacobb3_1-1663246718478.png

The recipients are valid email addresses (masked).

 

Any idea what it's failing? I believe it's because of the "Onboarding [Employee's Full Name]" but is there a way to provide the access to the list?

  • BJ-22072143-0 Profile Picture
    30 on at
    Re: Grant access to newly created SharePoint List

    That worked! It shows the employee assigned to that email address as having access to the SharePoint List. Hooray! Thanks for all the help.

    jacobb3_0-1663620780118.png

     

  • Verified answer
    Expiscornovus Profile Picture
    31,851 Most Valuable Professional on at
    Re: Grant access to newly created SharePoint List

    Hi @jacobb3,

     

    Can you add it via the expression editor instead of adding it as plain text?

  • BJ-22072143-0 Profile Picture
    30 on at
    Re: Grant access to newly created SharePoint List

    I got an error... I replaced the 7 with the text you provided. Below is the error and a screenshot.

    The expression "web/lists/getByTitle('Onboarding New Employee')/Roleassignments/addroleassignment(principalid=body('Send_an_HTTP_request_to_SharePoint_3')['d']['id'],roleDefID=1073741829)" is not valid.

    jacobb3_0-1663619335273.png

     

  • Expiscornovus Profile Picture
    31,851 Most Valuable Professional on at
    Re: Grant access to newly created SharePoint List

    Hi @jacobb3,

     

    Replace 7 by the following expression:

    body('Send_an_HTTP_request_to_SharePoint_3')['d']['id']
  • BJ-22072143-0 Profile Picture
    30 on at
    Re: Grant access to newly created SharePoint List

    Hi Expiscornovus,

     

    I'm not quite sure what I'm doing and could use more direction. I was looking at a YouTube video https://www.youtube.com/watch?v=mixlWw33I00 which got my closer to my goal of assigning permission. However, in the video they were using principalID=7, and based on my screenshots below this particular user would be 12. It's not always going to be 12 as the user will always be someone else. In the "Send an HTTP...3" step I am able to "GET" the correct ID. How do I change the "7" in the "Send an HTTP...2" step to the ID received in the step above?

    jacobb3_1-1663606771445.png

     

     

    jacobb3_0-1663606697669.png

     

  • Expiscornovus Profile Picture
    31,851 Most Valuable Professional on at
    Re: Grant access to newly created SharePoint List

    Hi @jacobb3,

     

    IDs are unique per list. It is very likely that these numbers are not in sync.

     

    In that case I would suggest to use a Get Items action and filter on the Onboarding [Employee's Name] title with a Filter Query. This way you should be able to retrieve the correct ID in the related list and use that within the grant access action.

  • BJ-22072143-0 Profile Picture
    30 on at
    Re: Grant access to newly created SharePoint List

    Hi Expiscornovus,

     

    ID 15 is from the a different list called New Hire Checklist, not the "Onboarding Gimme Access" list... I'm not sure how to add the ID for the correct SharePoint list...

     

    jacobb3_0-1663257233878.png

    The full flow is that a manager will add their employee's name, start date, their name (Manager), and the new employee's email address to the New Hire Checklist to the SharePoint List. Adding to the "New Hire Checklist" SharePoint List will trigger the automation. The automation creates "Onboarding [Employee's Name]" and then adds the needed columns, then gets data from another SharePoint list and copies them. Finally I want the new employee to get access to the "Onboarding [Employee's Name]" list, and this is the step I'm stuck on... giving access to the the full sharepoint list, not just one item on the list.

  • Expiscornovus Profile Picture
    31,851 Most Valuable Professional on at
    Re: Grant access to newly created SharePoint List

    Hi @jacobb3,

     

    Since you are using multiple lists in your solution can you double check if the Onboarding Gimme Access list has a list item with ID 15?

     

    show_idcolumn.png

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492