cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JGil
Level: Power Up

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
sprosser
Level: Powered On

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.

davebrown89
Level: Powered On

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?  

 

 

20181126_222556000_iOS.jpgError message on iOS

 

contacts collection.pngCollection w/ User ID stored by role

 

O365 lookup button.pngbutton embedded code w/ no errors

 O365 lookup HTML.pngHTML embedded code w/ no errors

 

 

 

RichBurdes
Level: Powered On

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

davebrown89
Level: Powered On

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.

 


@davebrown89 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?  

 

 

20181126_222556000_iOS.jpgError message on iOS

 

contacts collection.pngCollection w/ User ID stored by role

 

O365 lookup button.pngbutton embedded code w/ no errors

 O365 lookup HTML.pngHTML embedded code w/ no errors

 

 

 


 

gastroman
Level: Powered On

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
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,596)