cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Powerapp_novice
Frequent Visitor

Office365Users.UserProfileV2 Resource not found error

Hello, I need some help with Office365Users.UserProfileV2.

So I have i SP-list with users Ofiice Object ID, and I'm trying to display the user's information via their Object ID in a gallery.
The gallery items is a list with the Object ID, and I'm trying to show the username with this formula: 
Office365Users.UserProfileV2(ThisItem.Name).diisplayname. It works for the first user on the list.
But the other users return an empty value and the error msg: 

Powerapp_novice_0-1634557727956.png

 

But the same gallery shows an image: Office365Users.UserPhotoV2(ThisItem.Name) and it have no error for all users.

 

 

12 REPLIES 12
BCLS776
Super User
Super User

Can you use the Intellisense feature to carefully check your typing? I think the code should read:

Office365Users.UserProfileV2(ThisItem.Name).displayName

If you continue to get errors after that, please make sure valid ID's exist in your list.

 

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Hello, 

I misspelled it in my explanation, the code is written: 

Office365Users.UserProfileV2(ThisItem.Name).displayName

 And I know that it work since the first gallery item get populated.
And I also know that the object id is correct since all gallery items images get populated.  

Powerapp_novice
Frequent Visitor

@RandyHayes  do you know how to fix this?

Powerapp_novice
Frequent Visitor

@WarrenBelz @BCLS776 @StalinPonnusamy 
 do you know how to fix this?

StalinPonnusamy
Community Champion
Community Champion

Hi @Powerapp_novice 

 

I assume you have Id (Object id) .

Office365Users.UserProfileV2(ThisItem.Id).displayName

In this case, display it for reference and you can hide it.

 

StalinPonnusamy_0-1634906948916.png

 

Office365Users.UserProfileV2(IdLabel.Text).displayName

 

Goal to pass the id to UserProfileV2

 

I still get the same error after doing that:

Powerapp_novice_0-1634907898296.png

Powerapp_novice_1-1634908074465.png

It only displays for the first gallery item

StalinPonnusamy
Community Champion
Community Champion

Hi @Powerapp_novice 

 

Sorry, I just noticed that you are trying to get the manager's name.

1. Is the manager is set up in Office 365 like below

StalinPonnusamy_0-1634908315793.png

 

2. It's a known bug. We get an error message if any one of the users/employees does not have a manager

 

In this below sample, it displays the manager whoever has it but Name "Hepzibah" does not have a manager, so we are getting this error.

StalinPonnusamy_1-1634908438892.png


Thanks,
Stalin - Learn To Illuminate

 

 

Powerapp_novice
Frequent Visitor

Hello, 
All users on my list have a manager, but for some weird reason, it only shows the manager for the first user.
Then it just return an error

StalinPonnusamy
Community Champion
Community Champion

Hi @Powerapp_novice 

 

For troubleshooting

  1. Can you insert a label outside the gallery and set the text property to
Office365Users.ManagerV2("Guid/ObjectId").displayName

for the second item (any other) which is not working to see does return a value. Hardcord should return a value if exists

 

2. Remove the connector (Office365Users) and re-add it


Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,155)