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

Updating office 365 profile photo using PowerApps

Hello All,

 

I am creating a PowerApp application for my team where I want to showcase training materials, along with team members information along with their pics. I have built in a feature on one of the screens where the person using the application can change their display pic which will then be updated across all applications in Office 365 domain i.e. Teams, Outlook, etc. To achieve this functionality, I am using the following function to showcase the user image under a image media Office365Users.UserPhoto(Office365Users.MyProfile().Id)

 

I have created a button called "Change Profile Pic". On clicking of this button, user is navigated to different page where they can upload a image stored on their system and click of save. SAVE button has following code mentioned in OnSelect -   Office365Users.UpdateMyPhoto("image/jpeg", UploadedImage1.Image); Back();

where UploadedImage1.Image is a image media which showcases the image uploaded by user from their machine. 

 

On clicking on save, everything works fine and I am navigated back to my start page BUT, the newly uploaded image doesnt showcase until and unless I refresh the app. Also the image doesnt get synced across various applications like I wanted to. Is this feature of changing "Profile Image" possible via PowerApps? If yes, what steps am I missing?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Updating office 365 profile photo using PowerApps

Hi @AKB_2K ,

 

Try to workaround this by using a variable in the Image property of the image control:

 

V1

 

 

Then set the OnStart property of the app to:

 

Set(V1,Office365Users.UserPhoto(Office365Users.MyProfile().Id))

 

 

And set the OnSelect property that update the photo to:

 

Office365Users.UpdateMyPhoto("image/jpeg", UploadedImage1.Image); Set(V1,Office365Users.UserPhoto(Office365Users.MyProfile().Id));Back()

 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Updating office 365 profile photo using PowerApps

Hi @AKB_2K ,

 

I can reproduce your issue. But I think this is just runtime issue and even if you update your profile photo from Office365 directly, it will take a refresh of the page to make the change updated.

T1.JPG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: Updating office 365 profile photo using PowerApps

Hi @AKB_2K ,

 

Try to workaround this by using a variable in the Image property of the image control:

 

V1

 

 

Then set the OnStart property of the app to:

 

Set(V1,Office365Users.UserPhoto(Office365Users.MyProfile().Id))

 

 

And set the OnSelect property that update the photo to:

 

Office365Users.UpdateMyPhoto("image/jpeg", UploadedImage1.Image); Set(V1,Office365Users.UserPhoto(Office365Users.MyProfile().Id));Back()

 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

AKB_2K
Level: Powered On

Re: Updating office 365 profile photo using PowerApps

Nice, simple trick.

 

This definitely solves the refreshing app case but even now syncing of the profile image across O365 applications is a major problem. I can't see the profile image in Teams application which I uploaded via PowerApps yesterday.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,753)