cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AhTarek
Level: Powered On

Office 365 Users Photos Error - Invalid value for Parameter 'userId'

I have sharepoint list connected to gallery, the list has person field "Email" and text field with email addresses "EmailText" and field with thier PrincipalName named it "UserID" of some of the users that I want to display thier info on this gallery including thier Photo, I used the below formula but i get this error when I test the app on my iPad (tested on differents devices I get the same error)

CrestorError.jpg

Function used:

 

If(IsBlank(Office365Users.UserPhoto(ThisItem.Email.Email)),'genirc pp',Office365Users.UserPhoto(ThisItem.Email.Email))

I also tried different parametes for userphotos like Office365Users.UserPhoto(ThisItem.UserID) OR Office365Users.UserPhoto(ThisItem.TextEmail)

 

I also tried this (with different parametes )

If(Office365Users.UserProfile(ThisItem.UserID).AccountEnabled=false,'genirc pp',Office365Users.UserProfile(ThisItem.UserID).AccountEnabled = true And Office365Users.UserPhotoMetadata(ThisItem.UserID).HasPhoto= false,'genirc pp',Office365Users.UserPhoto(ThisItem.UserID))

but this time i get to invalid errors on both Userprofile and Userphotos

 

I also tried to use collection instead of sharepoint list and in this collections I retrived userId data from the funcion Office365User.SearchUser for each email address and used it as parameter but it game me error on the editor itself as invild parameter and excpecting text value instead (I tried converting it to text but it didn't work either)

 

however the function is working normaly and it shows the images as I wanted to be, but this red error it appears only once when I open the page where includes the gallary, so anyone colud help me with this error?

 

13 REPLIES 13
TopShelf-MSFT
Level 10

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

adding in @aorth to assist with this question. 

 

@TopShelf-MSFT

AhTarek
Level: Powered On

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

@TopShelf-MSFT @aorth, any update about this issue? 

TopShelf-MSFT
Level 10

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

Hi @AhTarek sorry about the delay in responding. This is still being worked on and we should have an updated solution for you shortly

 

@TopShelf-MSFT

tianaranjo
Level 8

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

Seems I too am having an issue retrieving the user photos. Is there a fix for this?
Highlighted
AhTarek
Level: Powered On

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

No, I am still waiting for their reply Are you using the same methods I have used?, please share your methods so we can figure out the problem.
KickingApps
Level 8

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

I have tried this method:

Office365Users.UserPhoto(ThisItem.MailNickname) 

I'm not receiving an error; yet nothing is displayed.

On the other hand, if I put gloThisUserPhoto (variable with photo of signed in user), it works.  My photo is displayed.

 

 

 

TopShelf-MSFT
Level 10

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

adding in @anees to review and assist. 

 

@TopShelf-MSFT

asdeev
Level: Powered On

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

Please try this

 

Office365Users.UserPhotoV2(User().Email)

 

It works for me

tianaranjo
Level 8

Re: Office 365 Users Photos Error - Invalid value for Parameter 'userId'

@asdeev - That is not working for me.  It pulls in my photo.  Where I am trying to pull in the photo of each person in the gallery.  

I have tried: 

Office365Users.UserPhoto(ThisItem.MailNickname) *MailNickname is employee ID # in Office365.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,300)