cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NE0
Regular Visitor

Get Guest User Mobile Phone

I have been succesfully using the Office 365 Users connector in our Power App which pulls in the Mobile Phone of a selected user on the fly with this formula:

 

    Office365Users.UserProfile(DataCardValue4.Selected.Email).mobilePhone

 

However, this doesn't work with external / guest users even though they are in the Directory. It returns this error:

 

"Office365Users.UserProfile failed - status 404 - No user found with the specified id"

 

I realize this is because they don't have a Profile and was suggested to use User() instead, but this is only good for the current user. We are filling out the PowerApp on behalf of the external user and want to enter their email and fetch the associated mobilePhone which exists in Azure AD.

 

Is it possible to pull the mobile phone # of a guest user in Power Apps?

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @NE0,

QiTest is a guest user in my Azure AD.

I directly populate the Combo Box with 

Office365Users.SearchUser({searchTerm:"",top:999})
Best Regards,
Qi

View solution in original post

3 REPLIES 3
v-qiaqi-msft
Community Support
Community Support

Hi @NE0,

Do you want to display guest users info within Power Apps?

 

vqiaqimsft_0-1647927550775.png

 

Actually, the identifier of a guest users is not stable. For some users, searching UPN works like a charm but for other users, searching Id directly will do.

For you ,try an identifier like Id.

Best Regards,
Qi

Yes, currently the User field only auto completes for Internal users and some select Guest users, I can't figure out why some don't show. For a test gmail account, the guest shows in the drop down when entering their full email however, the associated mobile phone does not populate based on my formula. Using .Id instead of .Email as you suggest does not work either.

 

Is your 'QiTest' user a Guest in your tenant? Is that bound to a SharePoint person field or is it a custom Power Apps drop down?

v-qiaqi-msft
Community Support
Community Support

Hi @NE0,

QiTest is a guest user in my Azure AD.

I directly populate the Combo Box with 

Office365Users.SearchUser({searchTerm:"",top:999})
Best Regards,
Qi

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,432)