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.
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.
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.
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.
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.
On successful configuration you will be to able to view the attributes recieved from Azure AD.
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.
Sync all users
Click on the Sync All Users button to sync your all Azure AD users to your WordPress site Database.
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.
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.
Click on Save button to save the configurations.
3. Test Connection
Now Scroll down to the Test Connection Section in the plugin.
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.
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.
Advaced Attribute Mapping
Scroll down to Advanced Attributes Section and click on the Add Attributes button.
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.
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.
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.
7. Sync User to WordPress Database
Now scroll down to the Active Directory to WordPress Provisioning Section in the plugin.
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.
Group Provisioning
Navigate back to the Azure Portal
Now go to the Overview section from the left navigation panel and click on Groups
Search for the Group from which you want to sync the users and copy the Object ID.
Now Go back to the Active Directory to WordPress Provisioning Section in the plugin.
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.
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.
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
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.
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.
You have successfully configured User Synchronization from WordPress to Azure AD.