cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bsfl
Frequent Visitor

Update Person Type From Power Flows with dynamic field name in SharePoint

Hi, I have a few of SharePoint lists with a PersonType field(diffenrent feild names).

My power Flows should take into account the dynamic personType field names.

My first idea was using the REST API. I found here

https://sharepains.com/2019/12/17/get-the-user-id-to-update-a-people-field-in-sharepoint-with-power-...

However, I only have person's email but not UserID.

 

Anyone can help me with this issue? 

 

Thanks a lot for your time and help ! 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@bsfl , you can try EnsureUser method in that case as shown in screenshot below. EnsureUser will add the users to Site Users, which will create the ID for the user in the Site.

 

annajhaveri_0-1611818234382.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
annajhaveri
Super User
Super User

@bsfl  you can get user id using the user's email address, as shown below

 

annajhaveri_0-1611245544570.png

 

 

Then get the user id from using following expression

body('GetUser')['d']['id']

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
bsfl
Frequent Visitor

Hi,anna

Thanks for your reply. I tried your method , however, if the person is not in the SiteUser, he/she will not be found. it seems I have to write the person into SiteUser.... any advice? 

 

@bsfl , you can try EnsureUser method in that case as shown in screenshot below. EnsureUser will add the users to Site Users, which will create the ID for the user in the Site.

 

annajhaveri_0-1611818234382.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

bsfl
Frequent Visitor

Hi Anna, 

Thank you so much!!!!!!!!!!!!!!! it works like a charm !!!! 

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (35,369)