Forum Discussion
Auto refresh fails the credentials are invalid
Hi Anonymous ,
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.
- Anonymous4 years agoNot applicable
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
- Icey4 years ago
Community Support
Hi Anonymous ,
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.
- Anonymous4 years agoNot applicable
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!