cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Re: the service returned an error: Office365Users!UserProfile

Was working then broke recently with

"Office365Users.UserPhoto failed: The method 'UserPhoto' has an invalid value for parameter 'userid'" 

 

Had to make this change: 

 

If(!IsBlank(ThisItem.UserPrincipalName), Office365Users.UserPhoto(UserPrincipalName)

Highlighted
Regular Visitor

Re: the service returned an error: Office365Users!UserProfile

Thanks!

 

That solved my problem, but my previous formula displayed a sample photo if one did not exist and I'm not sure how to insert this:

 

If(Office365Users.UserPhotoMetadata(ThisItem.Reviewer.Email).HasPhoto=false,SampleImage, Office365Users.UserPhoto(ThisItem.Reviewer.Email))

 

Into this:

If(!IsBlank(ThisItem.Reviewer),Office365Users.UserPhoto(ThisItem.Reviewer.Email))

 

Any help appreciated.

Highlighted
Anonymous
Not applicable

Re: the service returned an error: Office365Users!UserProfile

I'm running into the same issue... seems PowerApps doesn't like handling expressions within the userID field.  Any idea what may be throwing this?  

 

 

Error message on iOSError message on iOS

 

Collection w/ User ID stored by roleCollection w/ User ID stored by role

 

button embedded code w/ no errorsbutton embedded code w/ no errors

 HTML embedded code w/ no errorsHTML embedded code w/ no errors

 

 

 

Highlighted
Anonymous
Not applicable

Re: the service returned an error: Office365Users!UserProfile

Hey - for the missing image when the user doesnt have an image uploaded to o365 - Brian Dang released a youtube clip showing you need to have an icon in place behind your image call - so then if your image call is empty, the icon image will show instead - here's his clip - https://www.youtube.com/watch?v=pWUnmtnbJmk

Highlighted
Anonymous
Not applicable

Re: the service returned an error: Office365Users!UserProfile

I was able to resolve my issue above.  The O365 user call may time out and return the error "invalid userid method" even if you're returning a properly formatted principal id.  Also, point of advice, if you have a mysterious or erroneous column in your collection(s) be sure to check any recently changed fields.  I've found that Powerapps is pretty quick on the autocomplete and sometimes I've mistakenly typed in a "clearcollect(image3_1)" or something similar with a recent image/object I've been working with.

 


@Anonymous wrote:

I'm running into the same issue... seems PowerApps doesn't like handling expressions within the userID field.  Any idea what may be throwing this?  

 

 

Error message on iOSError message on iOS

 

Collection w/ User ID stored by roleCollection w/ User ID stored by role

 

button embedded code w/ no errorsbutton embedded code w/ no errors

 HTML embedded code w/ no errorsHTML embedded code w/ no errors

 

 

 


 

Highlighted
Frequent Visitor

Re: the service returned an error: Office365Users!UserProfile

Help please!!!

This error message is occurring when running the app in the iOS PowerApp app.

 

Works perfectly in the browser instance and the data loads as it should despite the error message.

Here is my code:

Concatenate(
    "<h2 style='margin-bottom: 0px !important'>",
    ThisItem.Member.DisplayName,
    "</h2><strong>",
    Office365Users.UserProfile(ThisItem.Member.Email).JobTitle,
    "</strong><br><ul><li>",
        ThisItem.'Unit:Division'.Value,
        "<br><ul><li>",
            ThisItem.'Unit:Group'.Value,
            "<br><ul><li>",
                ThisItem.Unit.Value,
                    "<h4></ul></li></ul></li></ul></li>P: ",
    First(Office365Users.UserProfile(ThisItem.Member.Email).BusinessPhones).Value,
    "<br>E: ",
    ThisItem.Member.Email
)

Thanks in advance.
PS. All list items have a member and I've tried the previous suggestions with IsBlank but made no difference.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,424)