The docs specify the following Request Body schema for OAuth2 authentication:
$UpdateUserCredential = @{
credentialDetails = @{
credentialType = "OAuth2"
credentials = "{`"credentialData`":[{`"name`":`"accessToken`", `"value`":`"$token`"}]}"
encryptedConnection = "Encrypted"
encryptionAlgorithm = "None"
privacyLevel = "None"
}
} | ConvertTo-Json
Like you I'm also extracting the access token from Authorization Header (tried with and without Bearer prefix) however I'm getting the error "value=The credentials provided for the SQL source are invalid. (Source at ServerName;DatabaseName.)" despite having granted permissions to the account.
Good luck.