web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sync to azureAd to sha...
Power Automate
Unanswered

Sync to azureAd to sharepoint directory

(0) ShareShare
ReportReport
Posted on by 4
 We have a cloud environment and need to create a flow that synchronizes with Azure AD to update a company directory in SharePoint. Despite extensive searching, there appears to be very limited information available on this technique.
Categories:
I have the same question (0)
  • Suggested answer
    SwatiSTW Profile Picture
    741 Super User 2025 Season 2 on at
    You want to sync Azure AD users to a SharePoint list to keep a company directory up to date, but there’s not much clear info available. Here's a simple way to do it using Power Automate and Azure AD connector.
    1. create a SharePoint list called "Company Directory" with columns
      Title (text)
      Email (text)
      Job Title (text)
      Department (text)
      Office Location (text)
      UserPrincipalName (text)
    2. go to Power Automate and create a new flow with trigger "Recurrence"
      set interval as per need (daily or weekly)
    3. add action "Azure AD - Get users"
      leave fields empty to get all users
      go to settings of this action > turn on Pagination > set threshold to 1000
    4. add "Apply to each" loop for value from Get users
    5. inside loop add action "Get items (SharePoint)"
      Site Address = your site
      List Name = Company Directory
      Filter Query =
      UserPrincipalName eq '@{items('Apply_to_each')?['userPrincipalName']}'
      Top Count = 1
    6. add condition
      expression =
      length(body('Get_items')?['value']) > 0
    7. if true (user exists), add action "Update item"
      ID =
      body('Get_items')?['value']?[0]?['ID']
      update fields with values from Azure AD like
      Title = displayName
      Email = mail
      Job Title = jobTitle
      Department = department
      Office Location = officeLocation
      UserPrincipalName = userPrincipalName
    8. if false (user not found), add action "Create item"
      fill all SharePoint fields with Azure AD user values
    9. flow is ready, save and test
  • CU27021323-0 Profile Picture
    4 on at
    Hi SwatisSTW, I created the flow base on your information provided, I do not see it add the new people already in the azureAD. is running succeedful.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard