Search Results :

×

WordPress – User Sync for Azure AD/B2C/Office 365 using Microsoft Graph APIs


Get Free Demo

User Sync from Azure AD Office 365 to WordPress can be achieved 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. In addition to this we also support 3rd party plugins like woo-commerce, Learndash, BuddyPress, Memberpress, Paid Membership etc.

Pre-requisites : Download And Installation

To sync Azure data from your Azure App to WordPress site you would need following pre-requisites:

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

User Sync for Azure AD Office 365 provides user synchronization from Azure/AzureB2C/Office365 to the WordPress. The plugin uses Microsoft graph API to fetch users from Microsoft Azure active directory.

 Tested with 6.5

Steps to configure User Sync for Azure AD Office365 plugin:

1. Configure the Azure AD App registration

Follow the steps below to configure Azure AD Sync 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.
  • Azure AD user sync with WordPress - Home Screen
  • In the left tab, under the Manage section, select App registrations tab.
  • Azure AD user sync with WordPress - App registraton
  • Click on the New Registration option.
  • Azure AD user sync with WordPress - 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.
  • Azure AD user sync with WordPress - 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.
  • Azure AD user sync with WordPress - 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.
  • Azure AD user sync with WordPress - Certificate and Secrets
  • Copy the value of Secret Key. This will be your Client Secret Key.
  • Azure AD user sync with WordPress - Client Secret
miniorange img Add API Permissions to your Azure AD Application:
  • Go to API Permissions from the left navigation pane and click on Add a permission option.
  • Azure AD user sync with WordPress - API permission
  • Select Microsoft Graph under the Microsoft APIs tab.
  • select Application Permissions and search for the User.
  • Azure AD user sync with WordPress - App permission
  • Under User select User.Read.All and User.ReadWrite.All permission and click on the Add Permissions button.
  • Azure AD user sync with WordPress - permissions
  • Similarly Search for Group in the Application Permission.

  • Azure AD user sync with WordPress - Group Permissions
  • Under Group select Group.Read.All permission and click on the Add Permissions button.
  • Azure AD user sync with WordPress - Group Permissions
  • Click on Grant admin consent for Default Directory and click on Yes on grant admin consent confirmation.
  • Azure AD user sync with WordPress - Admin consent

You have successfully configured Azure AD app to achieve User Sync into your WordPress Site.

2. Configure User Sync for Azure AD Office365 plugin

  • 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.
  • Azure AD user sync with WordPress - 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.
  • Azure AD user sync with WordPress - 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.
  • Azure AD user sync with WordPress - Test configuration
  • On successful configuration you will be to able to view the attributes recieved from Azure AD.
  • Azure AD user sync with WordPress - App registraton

4. Sync User to WordPress Database

  • Navigate to the WordPress User Sync tab.
miniorange img 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.
  • Azure AD user sync with WordPress - testconfig
miniorange img Sync all users
  • Click on the Sync All Users button to sync your all Azure AD users to your WordPress site Database.
  • Azure AD user sync with WordPress - 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.
  • Azure AD user sync with WordPress - App registraton

You have successfully configured User Sync for Azure AD Office365.


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

  • Navigate to the User Sync for Azure AD/Office365 Premium / Enterprise plugin.
  • Under the Manage Application tab, paste the information from the Azure AD App.
  • 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.
    Azure AD user sync with WordPress - Manageapp
  • Click on Save button to save the configurations.

3. Test Connection

  • Now Scroll down to the Test Connection Section in the plugin.
  • Azure AD user sync with WordPress - Test configuration
  • Enter the Test UPN/ID of the user present in your Active Directory.
  • Click on the Save Button.
  • After that click on the Test Attributes Button.
  • After a successful test connection, you will be able to view the attributes of the user.
  • Azure AD user sync with WordPress - App registraton

4. Basic Attribute Mapping

  • Go to Users tab in the plugin.
  • Map your attributes recieved from Azure AD (one can view a list of attributes received from Azure in the test connection window) to WordPress attributes, then click on Save.
  • Azure AD user sync with WordPress - Test configuration
miniorange img Advaced Attribute Mapping
  • Scroll down to Advanced Attributes Section and click on the Add Attributes button.
  • Azure AD user sync with WordPress - App registraton
  • On the left side, enter the " WordPress Attribute Name " which is the meta key of the attribute in which you wish to store the value. On the right side, map it with the corresponding " Azure Attribute Name " received from Azure AD.
  • Once you've entered the attribute details and mapped them correctly, click on the “Save” button to save your configuration.
  • Azure AD user sync with WordPress - App registraton
  • With the setup complete, the plugin will now automatically synchronize user attributes from Azure AD to the WordPress database during the synchronization process.

5. Role Mapping

  • Scroll down to Role Mapping Section.
  • Enable the Toggle Role/Group Mapping.

    Azure AD user sync with WordPress - Profile Picture Sync
  • Now in the input fields for the roles, enter the group id (i.e. Object id of group in Azure AD) to which a particular role should be assigned.
  • For example – If you want to assign the role Editor to a group in your Azure AD of Object ID (6aada18f-5408-46f8-ae09-b1c4fa273f69) type 6aada18f-5408-46f8-ae09-b1c4fa273f69 in the Editor field and click on Save.
  • Now whenever a user is synchronized from the group which you have mapped, it will automatically get assigned to the mentioned role.

6. Profile Picture Sync

  • Enable this option if you want to sync the profile picture of the user from Azure AD to WordPress.
  • Note: If a user in Azure AD does not have a profile picture, you can set a default image by entering its base64-encoded value in the designated field.

    Azure AD user sync with WordPress - Profile Picture Sync

7. Sync User to WordPress Database

  • Now scroll down to the Active Directory to WordPress Provisioning Section in the plugin.
miniorange img User Provisioning
  • Enable the toggle (Enable Automatic user creation/deletion) and specify the interval in which you again fetch the users and click on Save this will save your settings.
  • Now click on Cron Start it will start the scheduler.
  • Azure AD user sync with WordPress - App registraton
miniorange img Group Provisioning
  • Navigate back to the Azure Portal
  • Now go to the Overview section from the left navigation panel and click on Groups
  • Azure AD user sync with WordPress - App registraton
  • Search for the Group from which you want to sync the users and copy the Object ID.
  • Azure AD user sync with WordPress - App registraton
  • Now Go back to the Active Directory to WordPress Provisioning Section in the plugin.
  • Azure AD user sync with WordPress - App registraton
  • Now paste the Group ID that you copied previously in the Group ID field.
  • Enable the toggle (Enable Automatic user creation/deletion) and specify the interval in which you again fetch the users and click on Save this will save your settings.
  • Now click on Cron Start it will start the scheduler.
  • You have successfully configured Group Provisioning in the Azure AD Sync Premium plugin.

8. Sync User to Active Directory

  • Enables you to synchronize (create/update) your WordPress Users to Azure AD.
miniorange img Bulk Synchronization of All Users from WordPress to Azure AD.
  • Under Manage Application Tab navigate to WordPress to Active Directory Provisioning section.
  • Now to start the bulk synchronization process, click on Sync All Users to AD button. This will create a batch of all existing users in your WordPress. One can then start the synchronization process from WordPress to Azure AD by clicking the Start button.
  • Azure AD user sync with WordPress - Bulk user synchronization
  • During synchronization, it will create a user if they don't exist in Azure AD and update the user if they already exist.
  • Note :- Please note that this feature doesn't synchronize users password from WordPress to Azure AD, it will just create the User with correct details

miniorange img Manual Synchronization of a user from WordPress to Azure AD.
  • To start the manual synchronization of user, simply enter the username of the WordPress user in the search section and click Sync to synchronize the selected user.
  • Azure AD user sync with WordPress - Manual synchronization
miniorange img Automatic Synchronization of Azure AD User based on User Creation/Updation in WordPress.
  • To enable this feature, enable the toggle, Enable Auto User Create in Azure AD and Enable Auto User Update in Azure AD and click on Save.
  • Now whenever any user is created on WordPress it will be automatically be created in Azure AD.
  • Azure AD user sync with WordPress - Automatic synchronization
  • You have successfully configured User Synchronization from WordPress to Azure AD.

Additional Resources


If you are looking for anything which you cannot find, please drop us an email on office365support@xecurify.com


Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com