Azure Datafactory - OAuth2 Access token type not supported

Gaylord Dusautoir 1 Reputation point
2022-12-07T21:54:56.863+00:00

Hello,
We are working on a cloud data source integration for the ingestion. We are using OAuth2 authentication mechanism.
When we test the connectivity we receive this error message
Error Code: "OAuth2AccessTokenTypeNotSupported"
Details: The toke type 'bearer' from your authorization server is not supported, supported type: 'Bearer'

But RFC6749 does mention the Access token type registry as being case insensitive.

Is there anyone who already face that issue and found a workaround ?

Thanks

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,642 Reputation points Microsoft Employee Moderator
    2022-12-22T21:29:31.29+00:00

    Hello @Gaylord Dusautoir , @Rory Tarnow-Mordi ,

    After further analysis, this seems to be a bug in REST connector where it is expecting a case sensitive Bearer and when the authorization server returns lower bearer it is throwing an exception as the case sensitive validation fails. But when looked at the RFC6749 documentation the bearer token value is case insensitive. We have escalated this to respective product team to further evaluate and fix at the earliest possible. We do not have an ETA at this point but will keep you posted when we hear back from product team about the ETA.

    Workaorund: Until the issue is resolved from product team, as a workaround it is recommended to use Web activity (to get access token) + Copy activity (using access token to connect target source like 'Bearer + token')' instead of rest connector.

    273367-image.png

    Video: A similar requirement has been discussed in this video tutorial as well: Working with Token based REST API in Azure Data Factory

    Hope this info helps. Do let us know how it goes.

    Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.