A cloud-based identity and access management service for securing user authentication and resource access
Hello Your Highness
Thank you for reaching out to Microsoft Q&A.
AADSTS500191 error means Azure AD doesn’t yet trust the CA that issued your client certificate. On macOS the fix is the same as on other platforms: you have to register your issuing CA as a trusted certificate authority in your Entra tenant (and/or upload the specific client cert to your app registration). Here’s what to do:
- Export your Root CA (or issuing CA) public certificate in .cer or .pem format.
- In the Azure portal go to Azure Active Directory → Security → Authentication methods → Certificate-based authentication.
- Under “Trusted certificate authorities,” click “Add,” give it a name, and upload your CA public cert.
- Optionally configure any certificate policies (issuer subject name, user mappings, etc.).
- Save and wait ~5–10 minutes for it to propagate.
If you’re using a certificate on an App Registration (for service-to-service auth):
- Go to Azure Active Directory → App registrations → [Your App] → Certificates & secrets.
- Click “Upload certificate” and select your client cert or a certificate chain file.
On macOS, make sure your client cert and private key are installed in the login keychain (for example via security import mycert.pfx -k ~/Library/Keychains/login.keychain) and that whatever tool or SDK you’re using points to that keychain item.
Once your CA (or client cert) is trusted by the tenant, retry your sign-in and the AADSTS500191 error should go away.
Please let us know the above steps helps.
Reference list
• How to set up Microsoft Entra ID for client authentication
• Common questions and solutions for Microsoft Entra configuration
• How to assign users to a role
• Service Fabric security concepts
https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-security
• Service Fabric security recommendations