AWS Single Sign-On
User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Logging AWS SSO API Calls with AWS CloudTrail

AWS SSO is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in AWS SSO. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, Amazon CloudWatch Logs, and Amazon CloudWatch Events. Using the information collected by CloudTrail, you can determine the request that was made to AWS SSO, the IP address from which the request was made, who made the request, when it was made, and additional details.

To learn more about CloudTrail, see the AWS CloudTrail User Guide.

AWS SSO Information in CloudTrail

CloudTrail is enabled on your AWS account when you create the account. When activity occurs in AWS SSO, that activity is recorded in a CloudTrail event along with other AWS service events in Event history. You can view, search, and download recent events in your AWS account. For more information, see Viewing Events with CloudTrail Event History.

For an ongoing record of events in your AWS account, including events for AWS SSO, create a trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:

When CloudTrail logging is enabled in your AWS account, API calls made to AWS SSO actions are tracked in log files. AWS SSO records are written together with other AWS service records in a log file. CloudTrail determines when to create and write to a new file based on a time period and file size.

The following actions are supported:

  • AssociateDirectory

  • AssociateProfile

  • CreateApplicationInstance

  • CreateApplicationInstanceCertificate

  • CreatePermissionSet

  • CreateProfile

  • DeleteApplicationInstance

  • DeleteApplicationInstanceCertificate

  • DeletePermissionsPolicy

  • DeletePermissionSet

  • DeleteProfile

  • DescribePermissionsPolicies

  • DisassociateDirectory

  • DisassociateProfile

  • GetApplicationInstance

  • GetApplicationTemplate

  • GetPermissionSet

  • GetSSOStatus

  • ImportApplicationInstanceServiceProviderMetadata

  • ListApplicationInstances

  • ListApplicationInstanceCertificates

  • ListApplicationTemplates

  • ListDirectoryAssociations

  • ListPermissionSets

  • ListProfileAssociations

  • ListProfiles

  • PutPermissionsPolicy

  • StartSSO

  • UpdateApplicationInstanceActiveCertificate

  • UpdateApplicationInstanceDisplayData

  • UpdateApplicationInstanceServiceProviderConfiguration

  • UpdateApplicationInstanceStatus

  • UpdateApplicationInstanceResponseConfiguration

  • UpdateApplicationInstanceResponseSchemaConfiguration

  • UpdateApplicationInstanceSecurityConfiguration

  • UpdateDirectoryAssociation

  • UpdateProfile

Every log entry contains information about who generated the request. The identity information in the log helps you determine whether the request was made by an AWS account root user or with IAM user credentials. You can also learn whether the request was made with temporary security credentials for a role or federated user or by another AWS service. For more information, see the CloudTrail userIdentity Element.

You can create a trail and store your log files in your Amazon S3 bucket for as long as you want. You can also define Amazon S3 lifecycle rules to archive or delete log files automatically. By default, your log files are encrypted with Amazon S3 server-side encryption (SSE).

To be notified of log file delivery, configure CloudTrail to publish Amazon SNS notifications when new log files are delivered. For more information, see Configuring Amazon SNS Notifications for CloudTrail.

You can also aggregate AWS SSO log files from multiple AWS regions and multiple AWS accounts into a single Amazon S3 bucket. For more information, see Receiving CloudTrail Log Files from Multiple Regions and Receiving CloudTrail Log Files from Multiple Accounts.

Understanding AWS SSO Log File Entries

A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files are not an ordered stack trace of the public API calls, so they do not appear in any specific order.

The following example shows a CloudTrail log entry for an administrator ( that took place in the AWS SSO console:

{ "Records":[ { "eventVersion":"1.05", "userIdentity":{ "type":"IAMUser", "principalId":"AIDAJAIENLMexample", "arn":"arn:aws:iam::08966example:user/samadams", "accountId":"08966example", "accessKeyId":"AKIAIIJM2K4example", "userName":"samadams" }, "eventTime":"2017-11-29T22:39:43Z", "eventSource":"", "eventName":"DescribePermissionsPolicies", "awsRegion":"us-east-1", "sourceIPAddress":"", "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36", "requestParameters":{ "permissionSetId":"ps-79a0dde74b95ed05" }, "responseElements":null, "requestID":"319ac6a1-d556-11e7-a34f-69a333106015", "eventID":"a93a952b-13dd-4ae5-a156-d3ad6220b071", "readOnly":true, "resources":[ ], "eventType":"AwsApiCall", "recipientAccountId":"08966example" } ] }

The following example shows a CloudTrail log entry for an end-user ( action that took place in the AWS SSO user portal:

{ "Records":[ { "eventVersion":"1.05", "userIdentity":{ "type":"Unknown", "principalId":"", "accountId":"08966example", "userName":"" }, "eventTime":"2017-11-29T18:48:28Z", "eventSource":"", "eventName":"", "awsRegion":"us-east-1", "sourceIPAddress":"", "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36", "requestParameters":null, "responseElements":null, "requestID":"de6c0435-ce4b-49c7-9bcc-bc5ed631ce04", "eventID":"e6e1f3df-9528-4c6d-a877-6b2b895d1f91", "eventType":"AwsApiCall", "recipientAccountId":"08966example" } ] }