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

Community site session details

Session Id : 3JFfSbUysSOvVmjjB0IlrL
Power Apps - Building Power Apps
Unanswered

Office365Users.UserProfileV2 runtime error

Like (0) ShareShare
ReportReport
Posted on 12 Nov 2020 08:04:50 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)
  • ganeshsanap Profile Picture
    1,551 on 12 Nov 2020 at 08:50:37
    Re: Office365Users.UserProfileV2 runtime error

    @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 ‌‌👍

     

  • CU-18081211-6 Profile Picture
    9,266 Moderator on 12 Nov 2020 at 08:36:38
    Re: Office365Users.UserProfileV2 runtime error

    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 !

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete