To know how to sync manager field from AzureAD to WordPress using SCIM user Provisioning please follow the steps below:
You can also use the link here to download the SCIM User Sync/Provisioning plugin.
- First navigate to the Provisioning section of AzureAD Enterprise Application connected to your WordPress site.
- Now click on Show Advance options and click on Edit Attribute for CustomappSSO.
- Here add a new mapping with the following details.
- Once the mapping details are provided, then click on Save.
- Now click on Add New Mapping.
- Set the Target attribute as urn:ietf:params:scim:schemas:extension:CustomExtensionName:2.0:User:manager
- The above configuration should create a store manager ID ( WordPress user ID ), to add the email of the manager in the user meta you can add the following snippet.
Name | urn:ietf:params:scim:schemas:extension:CustomExtensionName:2.0:User:manager |
Type | Reference |
Referenced Object Attribute | urn:ietf:params:scim:schemas:extension:enterprise:2.0:User |
add_action('mo_scim_updated_user_by_patch','mo_test_manager',10,1);
function mo_test_manager($userID){
$manager_id = get_user_meta($userID,'manager',true);
$manager_user = get_user_by('ID',$manager_id);
update_user_meta($userID,'manager_email',$manager_user->user_email);
}