GetOrganizationsAccessReport - AWS Identity and Access Management


Retrieves the service last accessed data report for AWS Organizations that was previously generated using the GenerateOrganizationsAccessReport operation. This operation retrieves the status of your report job and the report contents.

Depending on the parameters that you passed when you generated the report, the data returned could include different information. For details, see GenerateOrganizationsAccessReport.

To call this operation, you must be signed in to the management account in your organization. SCPs must be enabled for your organization root. You must have permissions to perform this operation. For more information, see Refining permissions using service last accessed data in the IAM User Guide.

For each service that principals in an account (root user, IAM users, or IAM roles) could access using SCPs, the operation returns details about the most recent access attempt. If there was no attempt, the service is listed without details about the most recent attempt to access the service. If the operation fails, it returns the reason that it failed.

By default, the list is sorted by service namespace.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The identifier of the request generated by the GenerateOrganizationsAccessReport operation.

Type: String

Length Constraints: Fixed length of 36.

Required: Yes


Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

Type: String

Length Constraints: Minimum length of 1.

Pattern: [\u0020-\u00FF]+

Required: No


Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No


The key that is used to sort the results. If you choose the namespace key, the results are returned in alphabetical order. If you choose the time key, the results are sorted numerically by the date and time.

Type: String


Required: No

Response Elements

The following elements are returned by the service.


An object that contains details about the most recent attempt to access the service.

Type: Array of AccessDetail objects


Contains information about the reason that the operation failed.

This data type is used as a response element in the GetOrganizationsAccessReport, GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities operations.

Type: ErrorDetails object


A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.

Type: Boolean


The date and time, in ISO 8601 date-time format, when the generated report job was completed or failed.

This field is null if the job is still in progress, as indicated by a job status value of IN_PROGRESS.

Type: Timestamp


The date and time, in ISO 8601 date-time format, when the report job was created.

Type: Timestamp


The status of the job.

Type: String



When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 320.

Pattern: [\u0020-\u00FF]+


The number of services that the applicable SCPs allow account principals to access.

Type: Integer


The number of services that account principals are allowed but did not attempt to access.

Type: Integer


For information about the errors that are common to all actions, see Common Errors.


The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

HTTP Status Code: 404



This example illustrates one usage of GetOrganizationsAccessReport.

Sample Request &JobId=examplea-1234-b567-cde8-90fg123abcd4 &Version=2010-05-08 &AUTHPARAMS

Sample Response

<IsTruncated>false</IsTruncated> <JobCompletionDate>2019-06-18T19:47:35.241Z</JobCompletionDate> <JobCreationDate>2019-06-18T19:47:31.466Z</JobCreationDate> <JobStatus>COMPLETED</JobStatus> <NumberOfServicesAccessible>3</NumberOfServicesAccessible> <NumberOfServicesNotAccessed>1</NumberOfServicesNotAccessed> <AccessDetails> <member> <EntityPath>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-1a2b3c-k9l8m7n6o5example/111122223333</EntityPath> <LastAuthenticatedTime>2019-05-25T16:29:52Z</LastAuthenticatedTime> <Region>us-west-2</Region> <ServiceName>Amazon DynamoDB</ServiceName> <ServiceNamespace>dynamodb</ServiceNamespace> <TotalAuthenticatedEntities>2</TotalAuthenticatedEntities> </member> <member> <EntityPath>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-1a2b3c-k9l8m7n6o5example/123456789012</EntityPath> <LastAuthenticatedTime>2019-06-15T13:12:06Z</LastAuthenticatedTime> <Region>us-east-1</Region> <ServiceName>AWS Identity and Access Management</ServiceName> <ServiceNamespace>iam</ServiceNamespace> <TotalAuthenticatedEntities>5</TotalAuthenticatedEntities> </member> <member> <ServiceName>Amazon Simple Storage Service</ServiceName> <ServiceNamespace>s3</ServiceNamespace> <TotalAuthenticatedEntities>0</TotalAuthenticatedEntities> </member> </AccessDetails>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: