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 / Office365Users.UserPro...
Power Apps
Unanswered

Office365Users.UserProfileV2 runtime error

(0) ShareShare
ReportReport
Posted on by 306

Hi,

 

I have an app where I fetch some information about a user based on a text field. My formula looks like this:

 

Office365Users.UserProfileV2(txtUserInitials&"@blahbalh.com").displayName

 

Even though it works and fetches the data as expected, it get this runtime error in the app:

 

Office365Users.UserProfileV2 failed: { "error": { "code": "ResourceNotFound", "message": "User not found", "innerError": { "date": "2020-11-12T08:00:32", "request-id": "XXXXXX", "client-request-id": "XXXXXX" } } }

 

Is there anyway I can avoid this error?

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    Hi @NielsL,

    Is txtUserInitials a variable ?

    If so, based on your info, I think that this formula should get rid of the error:

    If(IsBlank(txtUserInitials),"",Office365Users.UserProfileV2(txtUserInitials&"@blahbalh.com").displayName)

     

    Hope it helps !

  • ganeshsanap Profile Picture
    1,551 on at

    @NielsL It is throwing this runtime error because either you are passing blank txtUserInitials or wrong UPN/Email to UserProfileV2 function.

     

    If you want to search the users then I will recommend you to use SearchUser() function instead of UserProfileV2().

    Check below documentation for more information on SearchUser() function:

    Additional referenceCREATE AN OFFICE 365 USERS LISTS AND SEARCH A USER 


    Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

     

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard