How to connect to Hubspot in ADF using REST connector with OAuth2 authentication?

Kamal 5 Reputation points
2023-10-20T07:58:38.9033333+00:00

Hubspot's OAuth app can provide below credentials to use OAuth:

Client Id, Client Secret, Access Token, Refresh Token

But in REST connector of ADF, if we want to use OAuth authentication we need to provide below credentials:

Client Id, Client Secret, Token Endpoint

I tried to provide the Hubspot's Endpoint to generate Access Token, which is https://api.hubapi.com/oauth/v1/token . But when ADF tries to connect using it, it fails with below error.

Failed to get access token from your token endpoint. Error returned from your authorization server: {"status":"BAD_GRANT_TYPE","message":"missing or unknown grant type","correlationId":"XXXX"}.
Processed HTTP request failed.

I am able to use Anonymous authentication method, with Access Token generated using Private App in Hubspot, but I want to know if I can use above OAuth2 authentication.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,777 questions
{count} vote

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,427 Reputation points Microsoft Employee
    2023-10-20T20:13:13.3133333+00:00

    @Kamal Thanks for using Microsoft Q&A forum and posting your query.

    Azure data factory does have a native connector for Hubspot. In Hubspot linked service you can configure below details to establish connection. Not sure what was the reason to go with REST connector when ADF has native hubspot connector. In REST connector you cannot provide Access token and refresh token from your Hubspot app. Hence recommend trying to explore ADF Hubspot connector.

    User's image

    You can explore more about this connector from this document: Copy data from HubSpot using Azure Data Factory or Synapse Analytics

    For complete implementation steps, you can also refer to this public article by a community volunteer: Connecting to HubSpot from Azure Synapse Analytics or Azure Data Factory

    Hope this info helps.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.