Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
We have a Power BI Dashboard that reads Cherwell data as a data source. We have it scheduled for auto refresh during the night.
The auto fresh frequently fails with ' (500): Internal Server Error' and we also see "Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again." message. When we re-authenticate Cherwell credentials, and run auto refresh, it runs fine. Also the auto refresh runs successfully, several times, but eventully, it fails with above mentioned errors. Any ideas why the authentication with Cherwell expires?
Thanks,
Seyed
Hi @SeyedG ,
I know little about Cherwell but have some thoughts.
Any ideas why the authentication with Cherwell expires?
Are you using an access token for authentication, which mentioned here: OAuth2 Authentication Modes (cherwell.com). If so, there will be an expiration datetime.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Icey,
I believe the answer to your question is yes, we are using OAuth2 to authenticate. I read the information in the link you proided, but the only thing that I see in the settings for the dataset is Data Source Credentials where Cherwell and Web credentials are listed. So, how do we go about making changes so that the authentication would not expire? We are hoping to resolve this so that we wouldn't have to re-authenticate everytime it expires.
Thank you,
Seyed
Hi @SeyedG ,
I find that, for security reasons, the maximum scheduled refresh token lifespan for Cherwell REST API client IDs in CSM is 1440 minutes (24 hours). This is also the default setting. It may no be changed.
Reference: Using Power BI and the Data Connector
An Access token is needed for all subsequent calls to the REST API to identify the User agent as a valid API user. The life span of the Access token is based on the client ID's settings. Access tokens tend to have a relatively short life span and can be refreshed with a Refresh token.
Refresh tokens are used to periodically refresh the Access token without the need to provide credentials again. Refresh tokens tend to have a longer life span than Access tokens and are also based on the client ID's settings. Once the Refresh token has expired or the user is logged out, a full login must be performed to obtain new tokens. It is not always necessary to use Refresh tokens, which are generally considered safer over non-encrypted transport protocols, such as HTTP. If you use an HTTPS connection, you can increase the Access token life span and use Access tokens for all subsequent connections.
Note: To further secure your system, use SSL.
Reference: OAuth2 Protocol for the REST API (cherwell.com)
In addition, here is a thread which is not exactly the same, but you can refer to:
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Icey,
This issue has not been resolved and I don't know how I got an email that a reply has been accepted as a solution. I now understand why the Access token expires in 24 hours. That being the case, how do I go about using Refresh token instead which has a longer life span? Also the error message in the diagram shows '400 Bad Request', the message we are getting is ' (500): Internal Server Error'.
Thanks so much!
Hi @SeyedG ,
I know little about Cherwell. Just give some reference:
1. Please check if this blog could help you:
Get Data from Twitter API with Power Query - Chris Koester;
In this blog, the author uses the Twitter POST oauth2/token method to obtain a bearer token.
2. Or, may be you need to build a custom connector, if you want to connect from Power BI to a REST API that uses OAuth2 authentication. You can find documentation on how to implement an OAuth2 flow in a custom connector here.
Reference:
Solved: Refresh token api call - Microsoft Power BI Community
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
When this error happens it starts continuously failing of data refreshes? or is it a one-off failure?
What is the authentication you are using?
If you are using any access token for authentication, kindly make sure that it is not expiring. Otherwise, this will keep happening.
Proud to be a Super User!
Hi Farhan,
Once the refresh fails, the auto refresh attempts to run in the next couple of scheduled times resulting in the same error and auto-refresh schedule eventually gets turned off. The error is "Web.Contents failed to get contents from (Cherwell URL)(500): Internal Server Error.
Any help with resolving this issue is greatly appreciated.
Hi Seyed,
Did you end up finding a solution for this on?
Cheers,
Parth
Hi Parth,
No, this issue never got resolved. Luckily, we don't use Cherwell any longer.
User | Count |
---|---|
10 | |
9 | |
5 | |
3 | |
1 |
User | Count |
---|---|
18 | |
12 | |
3 | |
2 | |
2 |