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 / Some users not found i...
Power Automate
Unanswered

Some users not found in _api/web/SiteUsers?&$filter=UserPrincipalName eq toLower(items('O365ID')) api call

(0) ShareShare
ReportReport
Posted on by 66

We add external users with O365 IDs to an Azure group, then grant  read permission to them through SharePoint group. 

External users need to complete MFA setup before they can access the application so they logon the site at least once. 

 

Occasionally some users can't be found by this api call: _api/web/SiteUsers?&$filter=UserPrincipalName eq toLower(items('O365ID')) 

Those users can be found when run check permission on the site, their permission is granted through the SharePoint group. 

 

The purpose of this api call is to find user's ID on the site then grant permission to it. 

 

Pls advise how to resolve the issue or a better more reliable way to get id of the user that has permission on the site, thanks in advance.

 

Categories:
I have the same question (0)
  • Mister_Shaik Profile Picture
    1,008 on at

    Hi @MWAN ,

     

    When you call the SharePoint rest API, it does not actually check the permissions the way we see through UI. Rather it would go into the Users list and check the user details.

     

    So when you hit the API to check user permissions or details, it is referring to the internal Users list, and the list is updated with user details only when there is any activity from that user on the SharePoint site.

     

    Even if you add the user to a site group or provide him permissions on the site, the API will not be able to find the user unless he/she visits the site.

     

    Hope this helps 🙂

     

    Kind Regards,

    Shaik Sha
    ________________________________________________________________________

    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • VNO Profile Picture
    43 on at

    I've the same isssue.  I create some external user (send invitation), get the user ID and try to add it so SP security group.  The api send the message 'user not found'.

    What do you mean by "only when there is any activity from that user on the SharePoint site" and how to add user to SP security group before any activity (makes sense to add user to security group to allow him to perform some activity (read)).

    Kr

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard