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.



  • In your WordPress admin, navigate to the User Sync for Azure AD / Azure B2C plugin.
  • Click the Manage Application tab.
  • Fill in the following fields:
Application ID Paste the Application ID from your Azure AD app's Overview tab.
Client Secrets Paste the Client Secret from the app's Certificates & Secrets tab.
Tenant ID The Directory (tenant) ID from the Azure AD app's Overview tab.
Test UPN A User Principal Name to test the configuration against.
  • Click Save to store the configuration.
Setup Azure AD Sync - Manage Application, credentials form


Before syncing any real users, confirm the plugin can actually reach your Azure AD tenant and pull back user attributes.

  • In the Manage Application tab, enter the User Principal Name of a real user in the Test UPN/ID field.
  • Click the Save button.
  • Click the Test Configuration button.
Setup Azure AD Sync - Test Connection, Test UPN field

  • On successful configuration you will be able to view the attributes received from Azure AD.
Setup Azure AD Sync - Test Attributes

Note - Azure AD Sync Test Connection

Note: If the test fails, double-check that the Application ID, Client Secret, and Tenant ID were copied exactly from the Azure AD app (no extra spaces), and that the Test UPN belongs to a real user in that tenant.



After successfully testing the connection, navigate to the Synchronization tab and scroll down to the Users Sync Settings section.

Sync a Single User

  • Click on the Azure AD to WordPress tab.
  • Enter the Azure AD User Principal Name (UPN) or Object ID.
  • Click the Sync button.

The selected Azure AD user will be created in WordPress. If the user already exists, the plugin updates the existing account instead of creating a duplicate.

Setup Azure AD Sync - Sync a Single User

Sync All Users

  • Click the Sync All Users button to synchronize every user from your Azure AD directory.

The plugin imports all Azure AD users into WordPress and updates existing users wherever applicable.

Setup Azure AD Sync - Sync All Users

Note - Azure AD Sync Users to WordPress

Note: After the synchronization is complete, navigate to Users in your WordPress dashboard to verify the synchronized accounts.



The plugin also supports synchronizing WordPress users back to Azure Active Directory.

  • Click on the WordPress to Azure AD tab under the Users Sync Settings section.
  • Enter the Tenant Name and click the Save button.
  • Enter the WordPress username which is to be synced.
  • Click the Sync button.

The selected WordPress user will be created in Azure AD or updated if the user already exists.

Setup Azure AD Sync - WordPress to Azure AD Sync

Note - WordPress to Azure AD Sync

Note: The Sync All Users option for WordPress to Azure AD synchronization is available in the Premium and higher versions.



Note - Attribute Mapping

Note: Attribute Mapping is available in the Premium and higher versions of the plugin.



Note - Role / Group Mapping

Note: Role / Group Mapping is available in the Premium and higher versions of the plugin.



Note - Profile Picture Sync

Note: Profile Picture Sync is available in the Premium and higher versions of the plugin.



Note - Manager Attributes Sync

Note: Manager Attributes Sync is available in the Premium and higher versions of the plugin.


You have successfully setup Azure AD Sync with WordPress.

  • 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

Step 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

Step 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

Step 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.

Step 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.

Step 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.

Step 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.


Step 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





ADFS_sso ×
Hello there!

Need Help? We are right here!

support