Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

  • iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on at
    Re: Fetching guest user details with Office 365 Users V2 connector?

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

  • VilPel Profile Picture
    287 on at
    Re: Fetching guest user details with Office 365 Users V2 connector?

    @iAm_ManCat 

     

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

     

    Ville

  • Verified answer
    iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on at
    Re: Fetching guest user details with Office 365 Users V2 connector?

    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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1