The error message "Request authorization tenant mismatch" typically indicates that there is a problem with the tenant configuration in your Azure setup. Here are some steps you can take to troubleshoot and potentially resolve this issue:
- Verify Tenant IDs: Ensure that the tenant IDs for both your Azure account (@HCLtech445.onmicrosoft.com) and the target account (@yvgt8.onmicrosoft.com) are correctly configured. The application must be registered in a way that allows it to access resources across both tenants.
- Multi-Tenant Application: Check if your application is registered as a multi-tenant application. If it is only set up for a single tenant, it will not be able to access resources in another tenant.
- Admin Consent: Make sure that admin consent has been granted for all required permissions in both tenants. Sometimes, permissions may need to be explicitly consented to in both environments.
- Cross-Tenant Access: Confirm that cross-tenant access settings are properly configured. This includes ensuring that both tenants have enabled cross-tenant communication and that any necessary policies are in place.
- Correct Scopes and Permissions: Double-check that the scopes and permissions requested in your API calls are appropriate for the resources you are trying to access. Ensure that they align with what is configured in the Azure portal.
- Check Application Configuration: Review the application settings in Azure to ensure that the redirect URIs and other configurations are correctly set up for both tenants.
If you continue to experience issues, consider reaching out to Azure support or checking the Azure community forums for additional assistance.
References: