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 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 863

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,680 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
    863 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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard