I am trying to pull in user photos from O365 into a PowerApp and noticed that if I connect to the Office365Users data connection there is a "UserPhoto" option you can select from the drop down but I can't seem to figure out the needed syntax.
Thanks,
Todd
Solved! Go to Solution.
The UserPhoto function on the Office365Users connector needs the id of the user for which you want the picture. There are a few ways you can get that:
The UserPhoto function on the Office365Users connector needs the id of the user for which you want the picture. There are a few ways you can get that:
I have tried this solution with Office365Users.UserPhoto(ThisItem.Id) but I get the following error The server returned with a HTTP error code 404. All the other Information is showing correctly though, just not the picture.
**Edit: I Believe this error shows for users that dont have a image selected. It appears to be working for users that have chosen an image. A decent work around is:
If(Office365Users.UserPhotoMetadata(ThisItem.Id).HasPhoto=false,SampleImage,Office365Users.UserPhoto(ThisItem.Id))
I have the same problem but the solution does not seems to be working.
below is the formula I am using.
If(Office365Users.UserPhotoMetadata(Office365Users.MyProfile().Id).HasPhoto=false,SampleImage, Office365Users.UserPhoto(Office365Users.MyProfile().Id))
Hello,
I got the same error,but don't know where to change the funtion.
User | Count |
---|---|
137 | |
132 | |
79 | |
75 | |
72 |
User | Count |
---|---|
210 | |
200 | |
69 | |
63 | |
54 |