userdirectory.test

    This method allows to test user directory connection settings.

    This method also allows to test what configured data matches the user directory settings for user provisioning (e.g., what user role, user groups, user medias will be assigned to the user). For this type of test the API request should be made for a user directory that has provision_status set to enabled.

    This method is only available to Super admin user type.

    (object) User directory properties.

    (bool) Returns true on success.

    Test user directory for existing user

    Test user directory “3” for “user1”.

    :

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": true,
    4. "id": 1
    5. }
    Test user directory for non-existing user

    :

    Response:

    1. "error": {
    2. "code": -32500,
    3. "message": "Application error.",
    4. "data": "Incorrect user name or password or account is temporarily blocked."
    5. },
    6. "id": 1
    7. }
    Test user directory for user provisioning

    Test userdirectory “3” for what configured data matches the user directory settings for “user3” provisioning (e.g., what user role, user groups, user medias will be assigned to the user).

    :

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "username": "user3",
    5. "name": "John",
    6. "usrgrps": [
    7. {
    8. "usrgrpid": "8"
    9. },
    10. {
    11. "usrgrpid": "7"
    12. }
    13. ],
    14. "roleid": "2",
    15. "userdirectoryid": "2"
    16. },
    17. "id": 1

    CUserDirectory::test() in ui/include/classes/api/services/CUserDirectory.php.