Unable to make a JDBC connection to AWS Redshift using Azure AD/SAML

Suraj Padinjarute 1 Reputation point

Hello Team,

I am configuring SAML connections using Azure AD to connect to AWS.I used the below doc to do the same.


It works from the console.

However, when i try to connect to the AWS resource using a jdbc client( SQL workbench) it throws me the below error

[JDBC Driver]SAML error: invalid_grant: AADSTS65001: The user or administrator has not consented to use the application with ID 'xxxxxxxx' named 'Amazon Web Services (AWS)'. Send an interactive authorization request for this user and resource. Trace ID: ffa472c9-7f1a-4efa-9e50-720d368b0000 Correlation ID: 42dce0a0-fb56-4a30-89c8-96b35e3b2776 Timestamp: 2020-04-11 02:26:10Z

I am the global admin of the account. I have given the admin consent to the enterprise application as well. Still getting the same error. I also followed the below doc to know more on the admin consent stuff.


Any help is deeply appreciated.

I am using the RedshiftJDBC42- driver

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,079 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,496 Reputation points Microsoft Employee

    If this is a registered application, you can have an admin consent to the app.

    Go to Azure Active Directory within the Azure portal.

    • Go to Application registrations.
    • Select the Application based on the App-Id.
    • Go to Required permissions (or API permissions).
    • Click Grant permissions.

    If this is not a application registered within the organization tenant and this is a third-party app, have the admin try the consent URL:


    I hope this helps!

    If any reply/answer helped resolve your question, please remember to "mark as answer" so that others in the community facing similar issues can easily find the solution.