Hello everyone. Since this very morning, my SQLBak job is failing with the following message:
“Job execution error: PSB:0034 Failed to refresh OAuth2 token.
invalid_grant (AADSTS70000: The user could not be authenticated as the grant is expired. The user must sign in again.
Trace ID: 7628b9f4-8081-4b21-8c1b-083515cde901
Correlation ID: 8809d207-fb9d-41d1-8ce1-393559d7d4b3
Timestamp: 2023-08-11 07:01:29Z)”
That doesn’t ring a bell, as I don’t remember having configured anything related to oauth when configuring my connection. In an other hand SQLBackupAndFTP, on the very same connection, succeed without any problem.
To anyone looking for an answer about this: as soon as the auth0 refresh token is outdated at SQLBak side, the system doesn’t display the “granting permission” window permitting to grant a new oauth token => only solution: delete OneDrive config and recreate it (only way to be presented the authorization window again).
I’m glad you found a solution by deleting and re-creating the OneDrive configuration.
Alternatively, you can refresh the Auth0 token in the “Store backups in selected destinations” => “OneDrive settings” by clicking the “change…” link (see screenshot) to reauthorize your OneDrive account.