DirectoryServiceData / Client / exceptions / AccessDeniedException

AccessDeniedException#

class DirectoryServiceData.Client.exceptions.AccessDeniedException#

You don’t have permission to perform the request or access the directory. It can also occur when the DirectoryId doesn’t exist or the user, member, or group might be outside of your organizational unit (OU).

Make sure that you have the authentication and authorization to perform the action. Review the directory information in the request, and make sure that the object isn’t outside of your OU.

Example

try:
  ...
except client.exceptions.AccessDeniedException as e:
  print(e.response)
response#

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Reason': 'IAM_AUTH'|'DIRECTORY_AUTH'|'DATA_DISABLED',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    You don’t have permission to perform the request or access the directory. It can also occur when the DirectoryId doesn’t exist or the user, member, or group might be outside of your organizational unit (OU).

    Make sure that you have the authentication and authorization to perform the action. Review the directory information in the request, and make sure that the object isn’t outside of your OU.

    • Message (string) –

    • Reason (string) –

      Reason the request was unauthorized.

    • Error (dict) – Normalized access to common exception attributes.

      • Code (string) – An identifier specifying the exception type.

      • Message (string) – A descriptive message explaining why the exception occured.