Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidClientException for the create_token_with_iam API #4093

Closed
koiker opened this issue Apr 23, 2024 · 2 comments
Closed

InvalidClientException for the create_token_with_iam API #4093

koiker opened this issue Apr 23, 2024 · 2 comments
Labels
bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged.

Comments

@koiker
Copy link

koiker commented Apr 23, 2024

Describe the bug

When trying to use the API CreateTokenWithIAM with Boto3, I get an InvalidClientException error.
Looks like this method wasn't implemented or is implemented incorrectly.

Expected Behavior

Receive a response from the method as per documentation:

{
    'accessToken': 'string',
    'tokenType': 'string',
    'expiresIn': 123,
    'refreshToken': 'string',
    'idToken': 'string',
    'issuedTokenType': 'string',
    'scope': [
        'string',
    ]
}

Current Behavior

Exception:
An error occurred (InvalidClientException) when calling the CreateTokenWithIAM operation:

Reproduction Steps

Sample code snippet to test:

import boto3

if __name__ == '__main__':
    client = boto3.client('sso-oidc')
    try:
        resp = client.create_token_with_iam(
            clientId='arn:aws:sso::111111111111:application/ssoins-1111111111111111/apl-abc123def456',
            grantType='urn:ietf:params:oauth:grant-type:jwt-bearer',
            assertion='ey...WhA',
        )
        print(resp)
    except Exception as e:
        print(e)

Possible Solution

Need to troubleshoot to understand why it is not working.

Additional Information/Context

No response

SDK version used

1.34.89

Environment details (OS name and version, etc.)

Python 3.11 (Tested with OSX and AWS Lambda)

@koiker koiker added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2024
@koiker
Copy link
Author

koiker commented Apr 23, 2024

After some troubleshooting, the issue is not in the SDK.

@koiker koiker closed this as completed Apr 23, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant