cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Update Office365 user Info in powerapps

I want to update the current user's info through a form in powerapps. I am able to display the current user's information but, if I change it, it is not updating in the user's profile. What code should I use to do this? This is what I have written in the DataSorce:

 

Office365Users.UserProfileV2(User().Email, {'$select':"streetAddress"}).streetAddress

 

Also, how do I edit the user's office phone?

 

Appreciated

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @keylama ,

Do you want to update the current user's info (e.g. Office Phone, streetAddress) within canvas app?

 

If you want to update the current user's info (e.g. Office Phone, streetAddress) within canvas app using Office365Users connector, I afraid that there is no way to achieve your needs.

 

Firstly, the Office 365 Users connector is a action data source, which you could not bind it to a Edit form, and use the Edit form to update the user profile info. You could only execute the Office365Users actions within behavior property of control, e.g. OnSelect property of a button.

 

In addition, the Office365Users.UpdateMyProfile() function in canvas app could only update the following properties:

4.JPG

you could not use the Office365Users.UpdateMyProfile() function to update the officePhone, streetAddress property.

 

As an alternative solution, I think custom connector could achieve your needs. You could consider create a custom connector based on Microsoft Graph REST API, then specify the "Update user" action within your custom connector. After that, in your app, create a connection to this custom connector, use the custom connector action to update user Profile.

More details about creating a custom connector based on Microsoft Graph REST API, please check the following article:

https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-f...

 

On your custom connector, you should define the following action path:

5.JPG

 

More details about creating custom connector in PowerApps, please check the following video or article:

https://www.youtube.com/watch?v=dBCS1nPsDiE&t=2s

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/register-custom-api

 

Best regards,

Community Support Team _ Kris Dai
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

5 REPLIES 5
Resolver III
Resolver III

Hey @keylama 

the "Office 365 Users" Connector only gets user data to show in the app. Check out the docs for further information: Connection Office 365 Userprofile 

 

If you want to update the users information, you can use the "Azure AD" Connector. The Information from your Office 365 Profile / Delve is also based on the Azure AD: Azure AD Update User 

 

I hope this will help you! 🙂

 

Best Regards

Marvin

 

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Oh ok, thanks @MarvinBangert !

 

I read the Azure AD link you provided, but there is no Parameter for Street Address. Any suggestion?

I am about to opt to creating a data base or list with the contact info and ignore User's Data.

Hey @keylama 

 

unfortunately, that are the only parameters you could update within the Azure AD Connector. You could suggest a new idea to update the action to also update contact information like a street address: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

Otherwise, you could forward your information to a Microsoft Power Automate Flow and use an HTTP action (premium connector) and update your information using Graph API: https://docs.microsoft.com/en-us/graph/api/user-update?view=graph-rest-1.0&tabs=http

Check out this blog from Serge Luca on how to use a Flow with HTTP action and Graph API: https://sergeluca.wordpress.com/2017/09/22/extend-microsoft-flow-with-the-microsoft-graph-and-0-code...
Instead of using the "GET", you should use the "PATCH" method. 

 

Hope this will help you.

 

Best regards

Marvin

 

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

I disagree.  The Office365Users connection does have some methods that allow for update of the user profile.  They are UpdateMyProfile() and UpdateMyProfilePicture().  But they only work for the current user and they don't provide the ability to update the address.  Check the reference here:

https://docs.microsoft.com/en-us/connectors/office365users/#update-my-profile



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support
Community Support

Hi @keylama ,

Do you want to update the current user's info (e.g. Office Phone, streetAddress) within canvas app?

 

If you want to update the current user's info (e.g. Office Phone, streetAddress) within canvas app using Office365Users connector, I afraid that there is no way to achieve your needs.

 

Firstly, the Office 365 Users connector is a action data source, which you could not bind it to a Edit form, and use the Edit form to update the user profile info. You could only execute the Office365Users actions within behavior property of control, e.g. OnSelect property of a button.

 

In addition, the Office365Users.UpdateMyProfile() function in canvas app could only update the following properties:

4.JPG

you could not use the Office365Users.UpdateMyProfile() function to update the officePhone, streetAddress property.

 

As an alternative solution, I think custom connector could achieve your needs. You could consider create a custom connector based on Microsoft Graph REST API, then specify the "Update user" action within your custom connector. After that, in your app, create a connection to this custom connector, use the custom connector action to update user Profile.

More details about creating a custom connector based on Microsoft Graph REST API, please check the following article:

https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-f...

 

On your custom connector, you should define the following action path:

5.JPG

 

More details about creating custom connector in PowerApps, please check the following video or article:

https://www.youtube.com/watch?v=dBCS1nPsDiE&t=2s

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/register-custom-api

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,850)