**To get short-term credentials for a role authenticated with SAML**

The following ``assume-role-with-saml`` example retrieves a set of short-term credentials for the  IAM role ``TestSaml``. The request in this example is authenticated by using the SAML assertion supplied by your identity provider when you authenticate to it. ::

     aws sts assume-role-with-saml \
         --role-arn arn:aws:iam::123456789012:role/TestSaml \
         --principal-arn arn:aws:iam::123456789012:saml-provider/SAML-test \
         --saml-assertion " "

Output::

    {
        "Issuer": "https://integ.example.com/idp/shibboleth</Issuer",
        "AssumedRoleUser": {
            "Arn": "arn:aws:sts::123456789012:assumed-role/TestSaml",
            "AssumedRoleId": "ARO456EXAMPLE789:TestSaml"
        },
        "Credentials": {
            "AccessKeyId": "ASIAV3ZUEFP6EXAMPLE",
            "SecretAccessKey": "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY",
            "SessionToken": "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
            "Expiration": "2019-11-01T20:26:47Z"
        },
        "Audience": "https://signin.aws.amazon.com/saml",
        "SubjectType": "transient",
        "PackedPolicySize": "6",
        "NameQualifier": "SbdGOnUkh1i4+EXAMPLExL/jEvs=",
        "Subject": "SamlExample"
    }

For more information, see `Requesting Temporary Security Credentials <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithsaml>`__ in the *IAM User Guide*.
