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 / Fetching guest user de...
Power Apps
Answered

Fetching guest user details with Office 365 Users V2 connector?

(1) ShareShare
ReportReport
Posted on by 287

Hello community members,

 

I have a use case where guest users need to access my Power App. Our canvas app uses a function in the OnStart of the app to get details of the current logged in user. In our case, we are using the following formulas:

 

  • Office365Users.MyProfileV2().mail
  • Office365Users.MyProfileV2().displayName

Notice that we are using the V2 connector because the old function is deprecated.

 

Now, this function is working perfectly with every internal user in our tenant. But, when guest users (external users) in our organization log in to our Power App, the function returns no data. The old version of the connector still works with guests though. Here is an example:

pp8.png

 

I read in the Microsoft documentation that there is a known limitation (number 7 on the list) with guest users: https://docs.microsoft.com/en-us/connectors/office365users/ . The documentation mentions that to workaround this, try specifying Select fields parameter explicitly to: id, displayName, givenName, surname, mail, mailNickname, accountEnabled, userPrincipalName, department, jobTitle, mobilePhone, businessPhones, city, companyName, country, officeLocation, postalCode.

 

What does the "Select fields" mean and how to use it in our code to retrieve the guest user's email and display name using the V2 connector?

 

Any help would be appreciated.

 

Ville

Categories:
I have the same question (0)
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hello,

     

    What they are saying is to use the formula as follows:

    Office365Users.MyProfileV2({'$select': "id, displayName, givenName, surname, mail, mailNickname, accountEnabled, userPrincipalName, department, jobTitle, mobilePhone, businessPhones, city, companyName, country, officeLocation, postalCode"}).mail

     

    Could you try that and let me know if it works? The documentation could be a LOT clearer on how to do that!

     

    Cheers,

    Sancho

  • VilPel Profile Picture
    287 on at

    @iAm_ManCat 

     

    Seems to work great for me and the guests, thanks a lot!!

     

    Ville

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Excellent, glad to hear that and glad I could help 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard