Search Results :

×

Azure AD/Office 365 User Sync for WordPress using Microsoft Graph APIs | Setup Azure AD Sync

Setup Azure AD User Provisioning with WordPress by using our User Sync for Azure AD Office365 plugin. This plugin uses Microsoft Graph API to fetch all the user's profiles from the Active Directory to the WordPress database. Seamless support for advanced sync features like Bi-directional user sync, automatic user creation & deletion, integration with SharePoint, PowerBI, Office365, Microsoft Teams, OneDrive, Azure AD Profile Picture Sync and integration setup Azure AD User Provisioning. In addition to this we also support 3rd party plugins like WooCommerce, Learndash, BuddyPress, Memberpress, Paid Membership etc.

In order to sync Azure data from your Azure App to the WordPress site and setup Azure AD Sync with WordPress, you would need following pre-requisites:

  • You will need Azure AD Global Administrator Access.
  • Our User Sync for Azure AD Office 365 plugin.

  • Log in to Azure AD Portal https://portal.azure.com as an Administrator.
  • You will be represented with the home screen of Azure Active Directory.
  • Under the Azure Services section, select Microsoft Entra ID.
Setup Azure AD Sync - Home Screen

  • In the left tab, under the Manage section, select App registrations tab.
Setup Azure AD Sync - App registraton

  • Click on the New Registration option.
Setup Azure AD Sync - App registraton

  • Assign the Display Name in the name field and choose the account type.
  • In the Redirect URI field, provide the URL of your WordPress site and click on Register button.
Setup Azure AD Sync - Account type

  • After the registration of an application, Azure AD assigns an unique application ID to your application.
  • Navigate to the Overview tab, in the left pane.
  • Copy the Application ID and the Directory ID, this will be your Client ID and Tenant ID.
Setup Azure AD User Provisioning - Application

  • From the left navigation pane, navigate to the Certificates & secrets tab.
  • Click on New client secret. Enter the description and expiration time and click on the ADD option.
Setup Azure AD User Provisioning - Certificate and Secrets

  • Copy the value of Secret Key. This will be your Client Secret Key.
Setup Azure AD User Provisioning - Client Secret

Add API Permissions to your Azure AD Application:

  • Go to API Permissions from the left navigation pane and click on Add a permission option.
Setup Azure AD User Provisioning - API permission

  • Select Microsoft Graph under the Microsoft APIs tab.
  • select Application Permissions and search for the User.
Setup Azure AD Sync - App permission

  • Under User select User.Read.All and User.ReadWrite.All permission and click on the Add Permissions button.
Setup Azure AD Sync - permissions

  • Similarly Search for Group in the Application Permission.
Setup Azure AD Sync - Group Permissions

  • Under Group select Group.Read.All permission and click on the Add Permissions button.
Setup Azure AD Sync - Group Permissions

  • Click on Grant admin consent for Default Directory and click on Yes on grant admin consent confirmation.
Setup Azure AD Sync - Admin consent

You have successfully configured the Azure AD app to setup Azure AD Sync with WordPress.



  • Navigate to the User Sync for Azure AD/Office365 plugin.
  • Under the Manage Application tab, click on the Get Started button of Manual (Custom App) to get the Manual App Configuration form.
Setup Azure AD Sync - Manageapp

Application ID Paste the Application ID from Azure AD App.
Client Secrets Paste the Client Secret from the Azure AD App.
Redirect URI Enter the URL of your WordPress site.
Tenant ID Paste the Directory ID from Azure AD App.
  • Paste the required information copied from the Azure AD App.
Setup Azure AD Sync - Manageapp

  • Click on Save button to save the configurations.

3. Test Connection


  • Perform Test Connection to check if correct user attributes are getting fetched for the entered UserPrincipleName value, Enter the UserPrincipalName or Object ID of the user in the Test UPN/ID field, then click on Save and then click on Test configuration button.
Setup Azure AD Sync - Test configuration

  • On successful configuration you will be to able to view the attributes recieved from Azure AD.
Setup Azure AD User Provisioning - App registraton

4. Sync User to WordPress Database


  • Navigate to the WordPress User Sync tab.

Sync an individual user

  • Enter UserPrincipleName / ID of any user of your Azure AD application.
  • Click on the Sync button to sync your Azure AD user to your WordPress site Database.
Setup Azure AD User Provisioning - testconfig

Sync all users

  • Click on the Sync All Users button to sync your all Azure AD users to your WordPress site Database.
Setup Azure AD User Provisioning - Sync All Users

  • The user will be created in the WordPress. If the user already exists then it will get updated.
  • Now to view the user attributes which you have sync from Azure AD to WordPress. Navigate to the Users tab in the plugins section.
Setup Azure AD User Provisioning - App registraton

You have successfully setup Azure AD Sync with WordPress.

2. Configure User Sync for Azure AD/Office 365 Premium/Enterprise plugin


  • Navigate to the User Sync for Azure AD/Office 365 Premium/Enterprise plugin.
  • Go to the Manage Application tab and configure the following:
Azure Service Type Select the Azure AD (Entra ID) option.
Application ID Paste the Application ID from Azure AD App.
Client Secrets Paste the Client Secret from the Azure AD App.
Tenant ID Paste the Directory ID from Azure AD App.
Tenant Name Enter your Tenant Name.
Redirect URI Enter the URL of your WordPress site.
  • Click the Save button to apply the configuration.
Setup Azure AD Sync - Manage Application, credentials form

3. Test Connection


  • Scroll down to the Test Connection section.
  • Enter the Test UPN/ID of the user present in your Active Directory.
  • Sync to WordPress (Optional): Click this button to manually synchronize an individual test UPN user to WordPress.
  • Enable the toggles below (Optional):
    • Fetch Custom Security Attributes - Enable this toggle to import the user's custom security attributes.
    • Fetch Manager's Attributes - Enable this toggle to pull the user's manager-specific attributes.
Setup Azure AD Sync - Test Connection, Test UPN field

  • Click the Save button.
  • Click the Test Attributes button.
  • After a successful test connection, you will be able to view the user's attributes.
Setup Azure AD Sync - Test Attributes

4. Active Directory to WordPress Sync


  • Scroll down to the Active Directory to WordPress Sync section.
  • Configure the following settings:
Group IDs Enter the Azure AD Group IDs whose users should be synchronized.
Note: Separate multiple Group IDs using the pipe (|) character.
User Identifier Select Username/Email or Object Identifier.
Enable Automatic User Creation/Deletion Enable this toggle and specify the auto-sync interval (minimum 5 minutes) to automatically create, update, or delete WordPress users based on changes in Azure AD.
Assign Content of Deleted User Enable this toggle and enter the username to assign posts and content from deleted users.
  • Click the Save button to save the configuration.
  • Click Start Sync to synchronize users immediately.
Setup Azure AD Sync - Active Directory to WordPress Sync

5. WordPress to Active Directory Provisioning


  • WordPress users can be synchronized to Azure AD using Manual Synchronization or Automatic Synchronization as follows:

Manual Synchronization

  • Single User Sync: Search for a user and click the Sync button next to the input field to synchronize that user individually.
  • Bulk Sync: Click Sync All Users To Azure AD to synchronize all WordPress users. You can monitor the progress and pause, resume, or cancel the synchronization.
Setup Azure AD Sync - Manual WordPress to Active Directory Sync

Automatic Synchronization

  • Enable the required toggles:
    • Enable Auto User Create in Azure AD: Automatically creates a user in Azure AD when a new user is created in WordPress.
    • Enable Auto User Update in Azure AD: Automatically updates Azure AD when a user's profile is modified in WordPress.
    • Enable Auto User Delete in Azure AD: Automatically deletes the linked Azure AD user when the corresponding WordPress user is deleted.
Setup Azure AD Sync - Automatic WordPress to Active Directory Sync

  • Click the Save button.

6. Attribute Mapping


Basic Attribute Mapping

  • Go to the Users tab.
  • Modify the attribute mapping as required.
  • Click the Save button to update the synchronization between Azure AD and WordPress.
Setup Azure AD Sync - Basic Attribute Mapping

Advanced Attribute Mapping

  • Scroll down to the Advanced Attributes section.
  • Click the Add Attribute button.
  • Configure the following column fields:
    • WordPress Attribute Name: Enter the WordPress user attribute.
    • Azure Attribute Name: Enter the corresponding Azure AD user attribute.
Setup Azure AD Sync - Advanced Attribute Mapping

  • You can configure multiple attributes by clicking the Add Attribute button again.
  • Click the Save button.

7. Role / Group Mapping


  • Scroll down to the Role/Group Mapping section.
  • Enable the Role/Group Mapping toggle.
Setup Azure AD Sync - Role / Group Mapping

  • Enter the Azure AD Group ID (Object ID of the group) for the WordPress role you want to assign. For example, to assign the Editor role to the Azure AD group with Object ID 6aada18f-5408-46f8-ae09-b1c4fa273f69, enter the Object ID in the Editor field.
  • Click the Save button.
  • Users synchronized from the mapped Azure AD group will now automatically be assigned the configured WordPress role.

8. Profile Picture Sync


  • Scroll down to the Profile Picture Sync section.
  • Enable the Profile Picture Sync toggle to keep profile images updated in WordPress based on the configured synchronization schedule.
  • Enter the value for the Refresh Interval field.
  • Click the Save button.

Setup Azure AD Sync - Profile Picture Sync

Note and Contact Us - Azure B2C SAML SSO with WordPress

Note: If a user in Azure AD does not have a profile picture, you can configure a default image by entering its Base64-encoded value in the designated field.


9. Manager Attributes Sync


  • Scroll down to the Manager Attributes Sync section.
  • Enable the Manager Sync toggle to synchronize reporting manager details for each user during both Bulk Sync and Delta Sync.
Setup Azure AD Sync - Profile Picture Sync

    Note and Contact Us - Azure B2C SAML SSO with WordPress

    Note: Azure AD does not provide webhook notifications for manager updates. The plugin periodically refreshes manager information at configurable intervals ranging from 30 minutes to 7 days.


  • Under the Manager Attribute Refresh (Periodic) section, enable the Periodic Refresh toggle and specify the Refresh Interval in minutes.
  • Click the Save button.

You can sync Azure AD groups to WordPress using our Azure AD integration plugin. Azure AD groups are synced to WordPress, and users are assigned WordPress roles based on their groups using the Azure Sync Integration plugin. This helps in managing role-based access, user provisioning, and group-level permissions on your WordPress site.

Automatic sync keeps your WordPress site aligned with Azure AD. It reduces manual user management, ensures accurate role mapping, and supports access control for intranet, LMS, and membership portals. It also simplifies onboarding and offboarding as users are added or removed from AD.



 Thank you for your response. We will get back to you soon.

Something went wrong. Please submit your query again

We'll Reach Out to You at the Earliest!





ADFS_sso ×
Hello there!

Need Help? We are right here!

support