Failed to update data source credentials: Value cannot be null. Parameter name:

SOLVE
New Contributor

Hi,

When sigin through hubspot oauth2 in power bi gateway for schedule refresh , it throwing error as Failed to update data source credentials: Value cannot be null. Parameter name: uriString. Could you please advise.

 

extensiondatasourcepath : 

https://app.hubspot.com/oauth/authorize?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&scope=cont...

extensionDataSourceKind: Hubspot

AuthenticationMethod: Oauth2

 

 

Thanks

Vinoth SUSAINATHAN

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Regular Contributor | Platinum Partner

@IsaacTakushi,

 

Thanks for bringing me into this thread.  Looking at what @vinoths has done, it appears he is trying to connect Power BI's web service directly to HubSpot.  That approach doesn't work when trying to schedule automatic refreshing.  It would be nice if it was that simple!  (Disclaimer:  This is the exact reason why we built our HubSpot connector for Power BI, described here, which enables automatic refreshing on a scheduled basis.)

 

Glad to answer any more questions about this topic! There are a lot of options now for connecting HubSpot to Power BI, but it's important to read the "fine print" to make sure the solution includes automatic refresh of HubSpot data in Power BI.





Did this post help solve your problem? If so, please mark it as a solution.

John Elmer
John Elmer, Bayard Bradford



Advanced CRM | HubSpot Integrations | Inbound Marketing for Sales Success

HubSpot Platinum Partner


Schedule a meeting with me
8 Replies 8
HubSpot Moderator

Hi, @vinoths.

 

Could you try two things and see if either of them allow you to connect the app?

  1. Remove &access_type=%22offline%22&include_granted_scopes=%22true%22&response_type=%22code%22 from the authentication URL so that the only parameters are client_id, scope, and redirect_uri, are included, per this article. This is to reduce the number of variables in the test.
  2. Unencode https%3A%2F%2Fpreview.powerbi.com%2Fviews%2Foauthredirect.html so that it appears listed as redirect_uri=https://preview.powerbi.com/views/oauthredirect.html. Per the article I listed above and all other examples I've seen, I have never seen encoded redirect_uri values work.

Isaac Takushi

HubSpot Developer Support
Highlighted
New Contributor

Hi Isaac,

Thank you for your reply. I have tried the two things that you mentioned above, it still getting the same error message. 

 

I tried to authenticate below,

1.png

 

Error Message

Failed to update data source credentials: Value cannot be null. Parameter name: uriString

 

Steps to reproduce:

I tried to set the schedule reresh, so prior to that it has to do update datasource credentials in power bi online service
When i try to update data source credentials of hubspot oauth2, It throwing the error. I unable to locate the issue where it has been. Could you please advise.

 

In Power Bi online Service -> Dataset ->

1.png

 

When i click edit credentials in hubspot datasource

1.png

I selected Upply

1.png

I redirected to the below url

1.png

 

I got the below error,

 

1.png

Thanks

Vinoth S

 

 

 

 

 

 

 

Reply
0 Upvotes
HubSpot Moderator

Hi, @vinoths.

 

I would like to take a step back so I can fully understand the situation.

 

Are you trying to build a custom integration between HubSpot and Microsoft Power BI? If so, is this the HubSpot app you are working on? I see it is installed here in account 4490686.

 

If this is your custom integration, were you able to get scheduled refreshes to work before, or is this the first time you are trying to set them up?

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes
New Contributor

Hi,

Yes I am trying to build integration to power bi using rest api. The connection made successful and i got data from Hubspot. The problem is when i schedule automatic refresh, the hubspot data source credentials is not updated to the power bi and it throwing the error.

 

 

Thanks

Vinoth

Reply
0 Upvotes
HubSpot Moderator

Hi, @vinoths.

 

Thanks for clarifying. I am not experienced working with Power BI, but I'll help as much as I can.

 

For others reading this thread, this Power BI article on data refreshes has helped me contextualize Vinoth's question.

 

@vinoths , could you clarify what you mean by "The connection made successful and i got data from Hubspot"? Are you referring to an initial sync, where your HubSpot data populated the Power BI report? Are you able to trigger a manual refresh by clicking Refresh Now or does that fail too?

 

If you are only able to get data once, then it sounds like your HubSpot OAuth credentials are expiring. Each access token expires after 6 hours. Can you confirm that your integration actively refreshes its access tokens with your refresh token?

 

Hey, @johnelmer! I see from theads like this that your HubSpot Partner agency, Bayard Bradford, built this connector between HubSpot and Power BI. I'm not asking you to help troubleshoot Vinoth's issue, but am I missing any major facets of connecting HubSpot and Power BI? I'll appreciate any insight!

Isaac Takushi

HubSpot Developer Support
Regular Contributor | Platinum Partner

@IsaacTakushi,

 

Thanks for bringing me into this thread.  Looking at what @vinoths has done, it appears he is trying to connect Power BI's web service directly to HubSpot.  That approach doesn't work when trying to schedule automatic refreshing.  It would be nice if it was that simple!  (Disclaimer:  This is the exact reason why we built our HubSpot connector for Power BI, described here, which enables automatic refreshing on a scheduled basis.)

 

Glad to answer any more questions about this topic! There are a lot of options now for connecting HubSpot to Power BI, but it's important to read the "fine print" to make sure the solution includes automatic refresh of HubSpot data in Power BI.





Did this post help solve your problem? If so, please mark it as a solution.

John Elmer
John Elmer, Bayard Bradford



Advanced CRM | HubSpot Integrations | Inbound Marketing for Sales Success

HubSpot Platinum Partner


Schedule a meeting with me
New Contributor

Hi Isaac,

Thank you for your reply.  

"The connection made successful and i got data from Hubspot". It means i could have access the hubspot data in power bi desktop but when i come to set schedule refresh in power bi online service, I am getting the error. It always fails.

 

"Are you able to trigger a manual refresh by clicking Refresh Now or does that fail too?" .  Yes Manual refresh is working fine in power bi desktop. But the problem only in schedule automatic refresh. 

 

"Can you confirm that your integration actively refreshes its access tokenswith your refresh token?" 

Yes since i am using custom hubspot connector it actively refreshes its access token with my access token. The problem is when redirected uri from hubspot outh2, the error happens.

 

Thanks

Vinoth S

 

Reply
0 Upvotes
HubSpot Moderator

Thanks for claifying, @vinoths. To be honest, I don't think I'll be able to help you much further, since I am not familiar with Power BI's limitations regarding scheduled automatic refreshing.

 

I really appreciate you jumping in, @johnelmer. To clarify, are you saying it's not possible to "directly" connect Power BI's web service to HubSpot through a HubSpot OAuth app? Vinoth has confirmed that manual refreshes work through this setup, but it sounds like there may be additional hurtles for the automatic refreshing? Would you be able to point Vinoth in the right direction here? Thanks for your time.

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes