You can translate the question and the replies:

ODBC with OAuth2

Hi, We want to configure an ODBC with OAuth2 on Windows, with an OAuth Server which exposes the grant type Authorization Code. In the ODBC configuration > Advanced Options > Page 3 > OAuth 2.0 settings > Extra parameters, we set : grant_type=authorization_code&code=|code|&redirect_uri=https://127.0.0.1:19443/sso/sso-openid/openid-login **The connection test failed with this error in mylog_xxx.log** > [2468-8.608]Preparing to send request: https://am.api-stg.fr.pierre-fabre.lcl/internal/oauth/token > [2468-8.622]Checking certificates: 0 > [2468-9.969]OAuth2 Error : invalid_request > [2468-9.975]OAuth2 Error description : Parameter [grant_type] is included more than once > [2468-9.987]CC_error_statements: self=00000277E67D6DE0 > [2468-10.012]CONN ERROR: func=protocol3_opts_array, desc='', errnum=101, errmsg='Unable to retrieve an OAuth2 access token for this connection.' **If we delete "grant_type=authorization_code", we have this log :** > [2468-3.555]OAuth2 configured for request token > [2468-3.569]Preparing to send request: https://am.api-stg.fr.pierre-fabre.lcl/internal/oauth/token > [2468-3.582]Checking certificates: 0 > [2468-4.417]OAuth2 Error : invalid_grant > [2468-4.421]OAuth2 Error description : No identity provider found for client : b1c6c808-1134-428b-86c8-081134d28ba1 > [2468-4.430]CC_error_statements: self=00000277E68A6DE0 > [2468-4.445]CONN ERROR: func=protocol3_opts_array, desc='', errnum=101, errmsg='Unable to retrieve an OAuth2 access token for this connection.' It seems that the ODBC driver wants to make Password flow by default, but our OAuth Server defines an Authorization Code flow with an SAML2 Identity provider. Could you help us to configure this usecase please ? Thank you, Huy
user
03-02-2022 12:45:45 -0500
code

1 Answer

Hi, I am able to successfully access the Denodo Platform through the ODBC Driver(without specifying the extra parameters) by following the steps Knowledge Base article : [How to connect to Denodo using ODBC with OAuth](https://community.denodo.com/kb/en/view/document/How%20to%20connect%20to%20Denodo%20using%20ODBC%20with%20OAuth). If I still face any issues even after performing the steps mentioned in the documentation, I will do the following checks, * Check whether the version of the ODBC driver is in the update 20210209 or a newer version because this feature is not supported in the older version of the Denodo ODBC driver. * Ensure values provided for the Token Endpoint, Client ID, Client Secret, Scope are correct. * Double-check that the value for the parameter “redirect URL” is specified correctly in the configuration. Hope this helps!
Denodo Team
08-02-2022 01:48:34 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here