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