IDP Specific

How to sync manager field from AzureAD to WordPress using SCIM user Provisioning?

335 views October 18, 2022 January 3, 2023 akshaydaundkar 2

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

  • 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.
  •    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);
    }

  • Whenever the user is updated by Azure with the manager field the above code will add the manager_email key in the user_meta table with the manager’s email.
  • If you are facing any issues or need any kind of assitance please feel free to reach out to samlsupport@xecurify.com.

Was this helpful?