Retrieves a policy that was evaluated for a specific access denied request. The operation returns the structured JSON document of the policy that was captured with the original authorization request. It doesn't retrieve the current version of the policy.
For some AWS services and policy types, the returned policy document includes all actions relevant to the service that processed the denied request, but might omit actions for other services.
Specify the authorization ID from the access denied error message and the policy URI returned by GetRequestAuthorizationDetails for the same authorization ID.
Access depends on the account and organization recorded for the principal that made the denied request. If an organization was recorded, the calling principal must belong to that organization. Otherwise, the calling principal must belong to the recorded account.
To use this operation, you must have the iam:GetRequestAuthorizationPolicy permission.