Microsoft Security Tech Accelerator
Dec 06 2023, 07:00 AM - 12:00 PM (PST)
Microsoft Tech Community

Conditional Access using certificate from Internal PKI

Copper Contributor


Hi all,

Fairly new to Conditional Access.

I have a scenario where we want to stop users accessing Office 365 applications if they are coming in from an external connection and don't have a certificate present issued by our internal PKI.

Is there a policy that we can configure in conditional access that says:


I am coming in from an external connection, look for a user/computer certificate on this device (be that laptop or mobile) and if present allow access. If not present, block access.

Primarily the goal is to stop users accessing Office 365 from non corporate, external devices.

This seems to fit the bill: am I on the right track here? Could configure an app control policy for Office 365, and add a device control/tag to specify a valid client certificate is required?




13 Replies

Hi Natalie, 


You are exactly right. You can create an Azure AD conditional access policy that routes traffic to Cloud App Security. In Cloud App Security, you would then upload the root or intermediate cert, and create an access policy that has:


The following conditions:

Device tag | does not equal | Valid client certificate

App | [relevant applications go here]

IP address | category | does not equal | Corporate


The resulting controls:



If you need help with this, feel free to reach me at


I've tried implementing this with absolutely no success whatsoever. I've put out internal and root certificate in MCAS. Created my conditional access policy. I can see alerts from my policy so I know the conditional access policy is running and the policy is triggered. But it seems MCAS is simply unable to make any certificate comparison so just blocks everything. Certificate or no certificate. There seems little detail on this. Which browsers are supported? Should it prompt when attempting to verify the certificate?

@Kevin Spreadbury we're having the same issues, any resolutions?

Hey Kevin, did you ever get this fixed?
I'm having the same issue here. Did you have any update on this?


Hi folks, it would be super helpful to get a support case number so I can track it with the team. You can reach out to me at if you need help with this. 


In general, the docs cover Client-Certificate Authenticated Devices in quite some detail here:

If you feel like this is missing explicit content, please let me know and we can work to update it.

Thanks for you reply Alex. I think I'll open a support case to get some help on this.
I read that article and I configured both conditional access and MCAS access policy, I uploaded the certificate (I tried only root CA, root + Intermediate CA and only intermediate CA) and in any case it didn't work.
Looking at some logs should be useful to see which part of the certificate validation is failing.

@Ru we have this working. You have to use a user certificate that the user cannot export and not a machine certificate. Another thing to watch for is the user experience through different browers. the browser will prompt for a certificate (except Firefox which will just block). Put the MCAS redirect url in trusted sites and ensure browser settings do not prompt for a certificate.

Awesome, thanks for the tip.
Can you elaborate on the redirect URL? Is this what site we expect to prompt for a client cert?

Also, “do not prompt for a cert”..Is this that setting that (more or less) says if there’s only one client cert go ahead and use it? And I’m assuming this is in the trusted sites zone settings?

This is all working perfectly on macOS, but I can’t get it to ask for a cert on Win10. My Win10 devices with certs are going directly to the CAS proxy in the browser.

@Schebby  The redirect is the path appended by MCAS reverse proxy. So dependent on your region (mine is EU) the url looks like this and you can see in the address bar when MCAS adds it when visiting the address under certificate control.

So you add for example * to the trusted sites zone. And yes you enable the setting in that zone for "do not prompt for a cert".

@Kevin Spreadbury I figured it out (with help from support)! It wasn't trusted sites or AutoSelectCertificateForUrls (on Chrome/Edge (Chromium) side) at all (although I had already set that per your guidance). It was that I didn't have a client cert in the local user cert store. Apparently, (on Win10 at least) the browsers won't look in the local machine cert store for client (identity) certs. I wasn't being prompted because nothing was available for the browsers to show. Once I added a cert to the local user cert store, it immediately started prompting (and working). 


Hope this helps others... 

@Schebby Hi, yes correct hence my comment above it needs to be a user certificate and not a machine certificate. You'll also need to ensure the certificate is not exportable by the user of course.