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 Apps / Using Office365 connec...
Power Apps
Unanswered

Using Office365 connector get User Principal Name for AD guest user type.

(0) ShareShare
ReportReport
Posted on by 690

Hey All - I'm trying to get the User Principal Name for an AD  Guest User Type in PowerApps using the Office365 connector

 

If I use 


Office365Users.UserProfile (User ().Email).UserPrincipalName 

 

works great - this is a Member User Type - but When I try the same logic as a Guest user type I get this error 

 

"Office365Users.UserProfile failed: { "status": 404, "message": "No user found with the specified id.\r\nclientRequestId: 9514105a-f450-4980-8c73-2b4c0bca45d3\r\nserviceRequestId: 3a26292a-9603-429e-b630-22c2372c9e67", "error": { "message": "No user found with the specified id." }, "source": "office365users-scus.azconn-scus-001.p.azurewebsites.net" }"

 

The user is there - in AD - any way to make this work or a workaround? 

 

Thx in advance 

Categories:
I have the same question (0)
  • AhmedSalih Profile Picture
    6,678 Moderator on at

    Hello, @ctedesco3307, Try and see if you can get the AAD GuestUser ID:

     

    Set(GuestUser, Office365Users.SearchUser({searchTerm: User().Email}))

     

    Then, 

     

    Set(GuestUserProfile, Office365Users.UserProfileV2(First(GuestUser).Id))

     

    Finally,

     

    GuestUserProfile.userPrincipalName

     

     

    If my reply helped you, please give a 👍  , & if it solved your issue, please give a 👍 & Accept it as the Solution to help other community members find it more.

    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.

    Visit my Blog: www.powerplatformplace.com

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

  • ctedesco3307 Profile Picture
    690 on at

       @AhmedSalih - thanks it's still not working.  There is a different error message that pops up now - its the same one that this user has.

     

    Solved: Office365Users.SearchUser error for Guest users - Power Platform Community (microsoft.com)

     

    Says in the ticket that this error is expected behavior b/c guest users are not provisioned on the tenant exchange server. says workaround is to create the users in a SharePoint list. Do you know of any other work arounds?  

    Thanks again!

     

     

    hey are not provisioned on the tenant exchange server.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard