Steps to reproduce:
- install the Office365 app on a local XWiki (I tested 11.9)
- configure OAuth on the Azure Portal for localhost:
** register XWiki app:

** click on "Authentication">"Switch to the old experience"
** add the Redirect URI:

** add Permissions:

** Go to "Certificates and Secrets" and generate a New Client Secret
Result:
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'a01b7f50-a47d-4ead-8c42-b707d9b37b56'.
Steps to reproduce:
** register XWiki app:

** click on "Authentication">"Switch to the old experience"** add the Redirect URI:

** add Permissions:

** Go to "Certificates and Secrets" and generate a New Client Secret
Result:
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'a01b7f50-a47d-4ead-8c42-b707d9b37b56'.