Hi @Zeeshan Butt ,
Welcome to the Microsoft Q&A platform!
It sounds like you have encountered a complex issue involving ADFS and OAuth, which can be tricky to troubleshoot. Here are some steps you can follow to investigate and resolve the issue:
1. ADFS Configuration for OAuth
Ensure that ADFS is configured to support OAuth token requests. The error "MSIS7065: There are no registered protocol handlers on path /adfs/oauth2/token" implies that ADFS might not be configured correctly to handle OAuth token endpoints.
- Ensure that the OAuth2 endpoints are enabled in ADFS. You can do this by running the following PowerShell command on the ADFS server:
Get-AdfsEndpoint -AddressPath "/adfs/oauth2/token"
The command should return details about the endpoint. If it does not, you may need to enable the endpoint.
- If the endpoint is not enabled, you can enable it using PowerShell:
Set-AdfsEndpoint -TargetAddressPath "/adfs/oauth2/token" -Enabled $true
2. Client Configuration
The client application (Outlook) should be correctly configured to use modern authentication.
- Ensure you've set the appropriate registry keys on the client machine to force the use of modern authentication. This includes the following:
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity] "EnableADAL"=dword:00000001
"Version"=dword:00000001
- Make sure that Office has been activated properly and is recognizing the modern authentication settings.
3. ADFS Relying Party Trust
Ensure that the ADFS Relying Party Trust (RPT) for the Exchange server is configured correctly.
- Check the claims issuance rules for the RPT to ensure they are set correctly to issue the necessary claims for OAuth.
- Make sure the client ID and redirect URI configured in the RPT match those used by the Outlook client.
4. Validate Certificates
Modern authentication requires valid certificates for both ADFS and Exchange. Ensure that:
- Certificates are not expired.
- All certificates are trusted by the client machine.
- The ADFS and Exchange servers have valid SSL certificates.
Troubleshooting Steps
- Review the ADFS logs for any errors or warnings that might provide more specific details about what is failing.
- Use tools like Fiddler or Wireshark to capture the network traffic between the client and the ADFS server to see if there are any obvious issues during the authentication process.
- Look for related events in the Event Viewer on both the client and the ADFS server. The specific error IDs and descriptions can often point you in the right direction.
Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.
Best,
Jake Zhang