I am having an issue with the token expiring if the script is running for more than an hour. The script is processing entries fine then after an hour we start getting "Your access token has expired". See error message from transcript below.
TerminatingError(Invoke-RestMethod): "{"error":{"code":"Authentication_ExpiredToken","message":"Your access token has expired. Please renew it before submitting the request.","innerError":{"date":"2023-07-26T17:16:42","request-id":"","client-request-id":""}}}"
I am having an issue with the token expiring if the script is running for more than an hour. The script is processing entries fine then after an hour we start getting "Your access token has expired". See error message from transcript below.
TerminatingError(Invoke-RestMethod): "{"error":{"code":"Authentication_ExpiredToken","message":"Your access token has expired. Please renew it before submitting the request.","innerError":{"date":"2023-07-26T17:16:42","request-id":"","client-request-id":""}}}"