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 / Ensure user method in ...
Power Automate
Unanswered

Ensure user method in Flows

(0) ShareShare
ReportReport
Posted on by 320

How to use Ensure User method in MS FLOWS with REST API to add the user in SharePoint site ??

 

Thanks

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @abd3127,

     

    Do you want to use the EnsureUser method of SharePoint REST API to add the user in SharePoint site within Microsoft Flow?

     

    If you want to use the EnsureUser method of SharePoint REST API to add the user in SharePoint site within Microsoft Flow, I think the "HTTP" action could achieve your needs.

     

    If you want to use the EnsureUser method of SharePoint REST API within the HTTP action, you should be able to access your SharePoint firstly based on SharePoint REST API. More details about accessing SharePoint using the HTTP action based on SharePoint REST API, please check the following article:

    http://sharepointscribblings.blogspot.jp/2017/07/call-any-sharepoint-rest-api-from.html

     

    More details about the EnsureUser method within SharePoint REST API, please check the following article:

    EnsureUser Method within SharePoint REST API

     

     

    Best regards,

    Kris

  • m3ngi3 Profile Picture
    725 on at

    Linking to the general documentation is useful but I was looking for an answer like this so added it here:

    Django_0-1655453034557.png

    Site Address is in an environment variable in my flow looking like:

     

     

    https://[SPdomain].sharepoint.com/sites/BusinessAppSolProFSDocumentsDEV

     

     

    Body is an object looking like:

     

     

    { 'logonName': 'i:0#.f|membership|django.lohn@emaildomain.nl' }

     

     

     

     

  • NumeriStrategy Profile Picture
    11 on at

    You've just saved my day! 😄

    Thank you

  • Knite.Tech Profile Picture
    5 on at

    Ditto! @Django this helped immensely to eliminate a problem with my flow when the user had not interacted with the SharePoint site/list yet.  (Or in the case of a guest user - hadn't completed sign in after a Teams invitation was sent to them.)

     

    Cheers!

  • MissDomiAbou Profile Picture
    3 on at

    Hi @Django  Thanks so much for this. I would add a little tweak if your user is a guest in the tenant

    Example  DomGuest@hotmail.com   in this case body would need to be

    { 'logonName': 'i:0#.f|membership|DomGuest_hotmail.com#EXT#@tenant.onmicrosoft.com' }

     

    To convert DomGuest@hotmail.com  to DomGuest_Hotmail.com#EXT#@tenant.onmicrosoft.com  for example in powerautomate  create a variable ( or use compose) as follow

     

    MissDomiAbou_0-1718988608494.png

    in the formula the replace function changes the @ in _

     

    replace(DomGuest@hotmail.com ,'@','_')

     

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