Hi @Maxime BERNARD ,
Per my test, If I enter the wrong Tenant_id in https://accounts.accesscontrol.windows.net/{tenant_id}/tokens/OAuth/2
,I will get the same error. So, the error may be a result of getting the wrong Tenant_id. Please follow the steps to get the Tenant_id again, and test again.
1.Input GET https://xxxx.sharepoint.com/sites/zellatest/_vti_bin/client.svc/
Headers: Authorization Bearer
Then you will get the WWW-Authenticate
,the realm=”xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx″
is SharePoint Online Tenant Id. (As shown in the screenshot)
2.Using the Tenant_id to get access token. Hope it can help you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.