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

Getting and updating Sharepoint list from O365 users

Hi!

 

My intention is to create a Users-list in Sharepoint that is based on O365 users. The list should be in sync with O365 users so if somebody is deleted from O365 the list item is deleted from Sharepoint. Same goes with new user appearing in O365 and that would be added in the list. My first question is about comparing the list to O365 users. Can I compare the changes both ways in one flow command or do I have to compare the lists first O365 users against Sharepoint list to see if new users have been added to O365?After that compare Sharepoint list against O365 users to see if somebody has been deleted.

 

Other question is about updating user data to Sharepoint list. If something is updated in O365 user profile what is the best approach to do the update? Do I create once a day flow that checks everything form O365 to see if something is updated by going row by row and column by column? Or is there a better trigger to do it by row example (changed modification time etc)? Best in my opinion would be that the update in O365 profile would trigger the update process. Is that possible?

 

The automation intent is to use it with Sharepoint webpart that would fetch user data from the Sharepoint list. I could do it straight from O365 users in webpart but there has to be customised data included in user data for example user status, work years etc. so it has to be saved in Sharepoint list.

 

I have also a question about arrays. The O365 Users fetch also Business Phones array that is inside the object fetched. When I'm using Select action for example can I get the phone number from business phones by using expression and index of the array meaning [index number]?

 

All help is appreciated 🙂

 

Br

 

C

 

1 REPLY 1
abm
Super User
Super User

Hi @Coda 

 

Since there are no triggers for Office365 user connector you need to compare each user record vs Lists rows using a foreach loop or get all the values in an array and compare the values.

 

How to compare two arrays?

https://powerusers.microsoft.com/t5/General-Power-Automate/get-differences-from-2-arrays/td-p/304051...

 

How to get telephone number attribute from user profile?

https://powerusers.microsoft.com/t5/Building-Flows/Get-telephoneNumber-attribute-from-User-Profile/t...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,214)