Office 365 Integration

Setting up 2-way user sync into Active Directory using Power Automate

If you are a user of Office 365 or Azure AD you can use StaffCircle's Office 365 integration to sync users over from Office 365 AD over to StaffCircle.

However this is a 1-way sync (updating StaffCircle from changes in Active Directory)  so this article describes how you setup 2-way sync to update Active Directory when a users details are changed within StaffCircle utilising both StaffCircle Webhooks and Power Automate.

Microsoft Power Automate (prev. Microsoft Flow)  comes as standard with many of the Office 365 licenses - please check your office 365 license.

If you do not feel comfortable or do not have the technical expertise to set this up then StaffCircle can provide professional services to provide this at additional cost.

Find the details to register a webhook in StaffCircle here: 2.0 Registering A Webhook

When creating the Flow within Power Automate you will be selecting an 'Instant Cloud Flow' and selecting the 'When a HTTP request is received' trigger which is at the bottom of the list.

From here you will be putting the Person JSON schema from our JSON Schema section (5.7 Persons) into the 'When a HTTP request is received' action box:

Click on '+ New Step' and search for 'Azure AD'  scroll down and find 'Update User'. You will be asked to sign in to your Azure account which you will need admin permissions for in order to update users.

Once you have signed in you will then need to add in 'workEmail' from the 'Dynamic content' into the 'User ID or Principal Name' field. This will match the e-mail from StaffCircle with the e-mail of a user with your AD.

The 'Dynamic Content' will have been populated by the webhook once it has been triggered.  

You can then populate any of the other information fields with more 'Dynamic Content' from the original webhook.