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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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
    807 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard