Remove Role from User
    • Dark
      Light
    • PDF

    Remove Role from User

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/roles.removeUserFromRole

    Permission required: access-permissions Remove a role from a user. Optionally, you can remove this role from a specified scope.

    Header parameters
    X-User-Id
    stringRequired

    The authenticated user ID.

    ExamplerbAXPnMktTFbNpwtJ
    X-Auth-Token
    stringRequired

    The authenticated user token.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    Body parameters
    object
    roleId
    string Required

    The ID of an existing role.

    Example6579adcf2dd9f9d9514f6
    username
    string Required

    The username for which you want to remove the role.

    Exampleuser08
    Responses
    200

    OK

    Success
    {
      "success": true
    }
    object
    success
    boolean
    400

    Bad Request

    Example 1
    {
      "success": false,
      "error": "The role properties are invalid. [error-invalid-role-properties]",
      "errorType": "error-invalid-role-properties"
    }
    Example 2
    {
      "success": false,
      "error": "Accessing permissions is not allowed [error-action-not-allowed]",
      "errorType": "error-action-not-allowed"
    }
    object
    success
    boolean
    error
    string
    errorType
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.