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

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,228 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,228 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

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