web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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,272 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,555 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard