Is there a way to allow for a longer period authentication token for an automated process?
Is there a lifetime or other best practice associated with the JWT generated by the v3/auth/signin API call? A user is asking if there is a way to allow for a longer period–like a year–that they can use for an automated process. I think the current token is only valid for a few hours.
The JWT expiration length can be increase using the property JWT_TOKEN_EXPIRY_TIME. It takes a value in milliseconds. Example: JWT_TOKEN_EXPIRY_TIME=3600000 for an hour.
Generally, JWT tokens are suppose to be short-lived per security best practices and it is not recommended to set it to more than few hours. Refresh token is an alternative when someone need extended access to API without reusing the password but our application currently doesn’t support it.
Power BI should allow for authentication at the time of the request and not rely on an arbitrarily long-lived token.