User provisioning fails because of expired access token
We have a SCIM application. When we open the Provisioning tab of our application, in the section Admin Credentials we have set:
Authentication method: OAuth2 Authtorization Code Grant
Authorization endpoint: https://login-testmain.docuware.cloud/xxxxxxxxxx/connect/authorize?response_type=code&client_id=yyyyyyyyyyyyy&scope=docuware.platform offline_access&redirect_uri=https%3A%2F%2Fportal.azure.com%2FTokenAuthorize
client id and secret and the rest of the data visible on the screenshot.
Although we have set the scope offline_access in authorization endpoint, when we try to provision a user after about an hour after authorizing with our application with this button "Authorize" (our token expiration time is 60 minutes), it fails because of the error on the screenshot 2. There isn't anything more verbose in the audit and provisioning logs. My colleague noticed that after about an hour we see the same quarantine message (screenshot 3) in Overview of the app so it informs us that the something happens with the service even before we try to provision a user. We assume that the error is caused because there is a problem getting a new authorization token. We are sure that https://login-testmain.docuware.cloud returns a refresh_token, when the scope offline_access is set in the request and it seems that Microsoft Entra does not have a mechanism to use the refresh token in order to get a new access token.
After clicking "Authorize" and when a new access token is taken we can again use the app for 60 minutes.
How could we fix the issue with the automatic getting of new authorization token after its expiration?