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

Announcements

News and Announcements icon
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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 523

#2
Valantis Profile Picture

Valantis 318

#3
David_MA Profile Picture

David_MA 235 Super User 2026 Season 1

Last 30 days Overall leaderboard