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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HTTP Request User Prin...
Power Automate
Unanswered

HTTP Request User Principal ID Adding Wrong User to SharePoint

(0) ShareShare
ReportReport
Posted on by 4

I'm hoping to build a flow that will give users viewing access to a few Lists that are required for a Power App. In doing so, I tried to use the Send an HTTP request action to 1) get the user's principal id and then 2) add role assignment (View) to a SharePoint List. Everything looks to work, I can GET the id and run the "add role assignment" POST request, but then when I check the List's sharing settings, the Flow has added a different user entirely (albeit with the correct role). When I check the output of the HTTP request that GETs the id, it shows the correct user's information. I added a test step to search users by id, and it also returns the correct user. But once it gets put into the HTTP POST to change List settings, for some reason it grabs the wrong user and slaps it onto the List.

 

(Alternatively, if anyone knows of a way to have people who use a Power App still see combobox / dropdown selections from a List, without having Viewing rights to the List, that would solve all my problems.)

 

Flow steps in question.Flow steps in question.Output of the "Get Principal Id" step.Output of the "Get Principal Id" step.

HTTP request to add sharing rights to the User Principal Id.HTTP request to add sharing rights to the User Principal Id.SharePoint List access list.SharePoint List access list.

 

 

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @ap01,


    Is the site where you are collecting the prinicipal id different than the site where you are applying the permissions to the same user?

     

    If so, it is good to know that the principal id can be different for a user per site collection.

     

    Below is an example to demonstrate this.

    The same user has ID 14 in Site A and ID 6 in Site B.

     

    principalid_different.png

  • ap01 Profile Picture
    4 on at

    Thank you! That worked, although I'm not exactly sure why? When I was having trouble, to get the ID, I used the address on the top, and to access the List I used the address on the bottom. I added the "/personal/[account]/" to the GET, and it returned a different id (with the correct user information) that then added the correct user to the List settings.

     

    Do you happen to know why https://[organization]-my.sharepoint.com/ is considered a different site than https://[organization]-my.sharepoint.com/personal/[account]/?

     

    ap01_0-1680265161896.png

     

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @ap01,

     

    Yes, that is correct. Every OneDrive site/personal site is a different site collection.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard