Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Entra.Chat

Entra.Chat artwork

How to Design Bullet-Proof Conditional Access Policies in Microsoft Entra ID

Apr 11, 202657 minAudioEpisode 55
ShareXLinkedInFacebookWhatsAppEmail

If you can’t immediately name your break glass accounts and the last time you tested them → you’re already at risk. In this episode of Entra Chat, Microsoft MVP Per Torben walks through the conditional access mistakes he sees even large enterprises making, and the practical framework he actually uses with customers. You’ll learn how to set up emergency access accounts the right way, why your CA policies should be built more like a firewall than a checklist, and the one naming convention that makes managing dozens of policies actually manageable. 🎧 Hit play, your tenant will thank you. Sponsored by: Entra ID Gaps That Cause Outages In Microsoft Entra ID, outages often start small: an expired client secret, a lapsed certificate, or a suddenly failing integration. Traditional controls don’t track credential expiry or enforce application ownership, so issues appear only after something breaks. Teams are left asking: * Which applications can access Microsoft 365 data? * Is that access still appropriate? * Who owns the app? Unclear answers stall reviews, weaken accountability, and slow delivery. ENow App Governance Accelerator closes these gaps by highlighting expiring credentials, surfacing permission risks, and identifying ownership gaps before they disrupt operations. New Standard Tier pricing makes it accessible for organizations under 10,000 users, typically $3,500-$9,500 annually. Subscribe with your favorite podcast player or watch on YouTube 👇 About Per Torben Per Torben is a Senior Architect at Crayon and a Microsoft MVP for Identity and Access. Based in Norway, he frequently writes highly-read posts featured on Entra. News and runs the collaborative tech blog “Agder in the Cloud”. LinkedIn - https://www.linkedin.com/in/pertorbensorensen/ 🔗 Related Links * Agder in the Cloud - https://agderinthe.cloud * I.D.E.A. for creating/configuring break-glass accounts * GitHub - https://github.com/Per-Torben/I.D.E.A. * Blog - https://agderinthe.cloud/2026/01/06/introducing-i-d-e-a-and-i-d-e-a-001/ * Protected actions: https://agderinthe.cloud/2025/02/12/protected-actions-adding-extra-guards-to-your-entra-id-gate/ * Conditional Access hardeing (series): https://agderinthe.cloud/2024/12/05/how-to-fix-the-fundamental-flaw-in-conditional-access-part-1-introduction-and-coverage-gapsCA geo filter (series): https://agderinthe.cloud/2025/11/06/diving-into-geo-filter-with-entra-conditional-access-part-1 * Entra Backup - https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/backup-restore 📗 Chapters 06:22 The importance of Break Glass accounts 09:02 Securing emergency access with FIDO2 and RMAUs 18:10 Configuring Conditional Access: The “Block by Default” strategy 27:26 Managing scope and preventing accidental lockouts 29:31 Persona-based naming conventions for CA policies 35:38 Grouping settings and avoiding bloated policies 41:54 Handling exceptions and travel access with Access Packages 44:55 The flaw in Protected Actions for Conditional Access 53:38 Using the new Entra Backup feature for quick restores Podcast Apps 🎙️ Entra. Chat - https://entra.chat 🎧 Apple Podcast → https://entra.chat/apple 📺 YouTube → https://entra.chat/youtube 📺 Spotify → https://entra.chat/spotify 🎧 Overcast → https://entra.chat/overcast 🎧 Pocketcast → https://entra.chat/pocketcast 🎧 Others → https://entra.chat/rss Merill’s socials 📺 YouTube → youtube.com/@merillx 👔 LinkedIn → linkedin.com/in/merill 🐤 Twitter → twitter.com/merill 🕺 TikTok → tiktok.com/@merillf 🦋 Bluesky → bsky.app/profile/merill.net 🐘 Mastodon → infosec.exchange/@merill 🧵 Threads → threads.net/@merillf 🤖 GitHub → github.com/merill Get full access to Entra. News - Your weekly dose of Microsoft Entra at entra.news/subscribe

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

SPEAKER_00We'll be right back.

SPEAKER_01Hey, folks, welcome to another episode of EntraChat. And today I have Microsoft MVP with me. Per Torben is an MVP for identity and access. Per Torben is regularly featured on EntraNews. He writes some really good posts. and people always love them and always click on his articles. So Per Torben, thank you so much for all that you do for the community and for sharing so much. We're going to be doing a very deep dive into conditional access and all the things that can go wrong.

And, you know, Per Torben has some really cool tips and tricks for conditional access.

SPEAKER_01So we're going to do a full-blown deep dive into that. Per Torben, welcome to the show.

SPEAKER_02Thank you so much.

SPEAKER_01Awesome. So tell us a little bit about yourself. You are a senior architect at Crayon. Tell us how you came to be, to enter into identity and, you know, being an MVP now.

SPEAKER_02Absolutely. Thank you so much for having me. Well, my name is Peer Torben-Sonshin. I was recently awarding MVP within Identity and Access, and I'm very grateful for that. That's so awesome.

SPEAKER_01Yes.

SPEAKER_02I live in Kristasson, which is on the south coast of Norway. And I grew up in the northern part of Norway, where the winter is long and the summer is really short. I usually reference myself as a climate refugee because I enjoyed the warm weather. So I moved here in 1999, and I've been working in IT ever since. And I've been working primarily with server management. Started out with some Linux systems and moved over to Microsoft.

SPEAKER_02I can even remember the Windows 2000 launch back in the days. Wow. And I've been working primarily with Active Directory and file service and RDP and all that good stuff. And in 2017, I switched from server management to become a consultant. And ever since then, I've been working with primarily migrating customers from on-premise to the cloud and also tenant migration. Nice. I always liked working with identity and security has also been

in my interest for

SPEAKER_02all this time. So it's really fun to see all the different security features we now have in the clouds. And I remember like 10 years ago or so, then people were too scared to go to the cloud. What about our data? What about security? And nowadays it's, like I say, it's actually easier to protect your data in the cloud than it is on premise, ironically enough.

SPEAKER_01Absolutely. I remember the first time I was involved in a project where we were moving all the Exchange mailboxes to the cloud. At the time, I remember we were given like, what was it, like 10... 10 or 20 or 30 MB of disk space for our mailbox or 50 MB and then you need to keep cleaning it up and it would go into an archive which would you know be bigger but your inbox was always 50 it was crazy thinking about you know

how we used to manage

SPEAKER_01all of that and then We're like, oh, we're going to now move all these to Exchange Online in the cloud. And half the people didn't believe it. Like the security teams were like, oh, we are not going to move our mailboxes to the cloud. But the very same folks now, you know, wouldn't even blink talking about the cloud and having to secure things. Yeah. It's come a long way and conditional access has come a long way too as well compared to when I remember first looking at it. There were so few options back then and it's been a lot,

SPEAKER_01lot of new things in conditional access. It's like a whole new thing altogether, right? It's an area on its own. So I'm very excited to jump into all of that and learn from your experience. Yeah, I'd be happy to. Awesome. Right. So tell us about some of the stuff you do, right? Like you have a blog as well that, you know, you share a lot of content on there.

SPEAKER_02Yeah, it's actually a funny story because we attend, we have a conference in Norway, in Oslo called the NIC, stands for Nordic Infrastructure Conference, where we from Crayon are the main sponsor of it. And let me think it's about two and a half years ago. That's in Oslo, which is four hours from where we live. So we were driving from the conference that year. Me and three of colleagues was in my car and I was driving. I was thinking that I used to blog a few years ago. And in my experience, it was a good thing to blog,

but then suddenly work became too busy. And my experience was that the longer it took before you posted a blog post,

SPEAKER_02the harder it was to get back on it. So I thought that let's do this together. So if I'm too busy, then someone else can blog and vice versa. So I pitched the idea while we were driving. And by the time we got there, we settled on the name and everything. So me and Åsne and Therese and Tommy, who's all contributing to the blog, we made that up together while I was driving. Nice, nice. Back from the conference.

SPEAKER_01So what does it stand for? The name, it's a really interesting name.

SPEAKER_02Yeah, it becomes a little bit, what should I say, internal. Because you see the Agder is the name of the county in Norway where we live. All right. So our discussion was that Agder was something we wanted to elevate up that It is an area of Norway where there are a lot of expertise within IT, and we want to have something IT-related, cloud-related, and all that stuff. So we sell on Agda in the cloud, you know, trying to lift up the area. Nice.

SPEAKER_01So it's Agda in the dot cloud, right? Yes, it is. Nice. Very cool. Very cool. Cool. Awesome. Great. So where shall we start with conditional access? Should we start with, like, the break glass accounts?

SPEAKER_02I think that's a good idea.

SPEAKER_01Yes. Yeah. Before we do anything in conditional access, right? And I know so many enterprises, even very large enterprises, they're like, The Breakless account was set up some time ago, but we turned off the logging and they have no idea who has the password and if it even still works. But it's there, it's created and whether it works or not is another question. So let's talk about that. What is a Breakless account and why is it important when working with conditional access?

SPEAKER_02Well, the break class account is really important because it is like the name suggests it's your way to get back in in case something goes wrong. I mean, it can be a technical outage, but it can also be configuration errors. And I've learned that the hard way.

SPEAKER_00Yeah.

SPEAKER_02Luckily, it is a lot more difficult nowadays to lock yourself out of your own tenant than it used to be. But it is still possible. I did it myself a couple of months ago on purpose for testing it. Oh, wow. Yeah. And it works. Actually, I had one of my first customers after I went over to consulting. I was having quite a hard time convincing him to turn on MFA. Because that's too cumbersome and password is good enough and, you know, all those excuses. So I spent a lot of time convincing them why it is important

and how easy it is to

SPEAKER_02set up and all that stuff. And two weeks after I convinced them to let's go MFA, then the MFA service had an outage. Right. So no one could sign in. Wow. Yeah. So that was that was slightly embarrassing. So I learned the hard way. Yeah, we need a way to get in. And luckily, one of the other admins had been dragging his feet on enabling MFA for his accounts. He became the de facto break loss account in that situation.

SPEAKER_01But lesson learned. Nice. Yes. Absolutely. So it is actually one of the first things I ask any customer I'm meeting with if

SPEAKER_02we're going to talk about security and conditional access and such. You know, what are your break glass accounts and when was the last thing you tested them? You need to understand the cultural difference here because I come from the northern part of Norway and we are known to be very direct and very informal. And, you know, we're a straight shooter, as the term goes. And down here in the south, they are usually the opposites. so i usually arrest them immediately and just tell them that if you need to think about the answer to my question then you're doing it wrong

right so you should know absolutely on the spot it's that account that we tested it on that time if you don't you're doing it wrong that simple right so yeah it's a bit brutal but it gets

SPEAKER_02the message across

SPEAKER_01Yeah. So what are the tips you recommend for creating the break glass account? What are the things you've seen people do it the wrong way or, you know, a better way?

SPEAKER_02That is an excellent question because I've been discussing it a lot. including on LinkedIn. And I know you as well were involved in those discussions. But in my mind, I would say that you need to secure them enough, but at the same time, you need as few dependencies as possible because you don't want the break glass account to be unable to sign in because of some sort of dependency. And so it is usual stuff. You have it cloud only. You use the on Microsoft domain and you secure it with physical

FIDO2 keys for less

SPEAKER_02dependency and security. And now as all the admin portals automate, So that's one less dependency, but you still have an MFA requirement. And as long as FIDO 2 is the only method available for the account, then you have them. And I know me and a few other MVPs, I was not an MVP back then, we had a discussion about how to secure those accounts.

And someone wanted to put them in role assignable groups without assigning roles

SPEAKER_02just for the protection. And I wanted to put them in, let's say, restricted management administration units.

SPEAKER_01Right.

SPEAKER_02That's a mouthful.

SPEAKER_01Yes, yeah.

SPEAKER_02And some want both of them. And I have to say about RMAUs that the more I use them, the more I like them because it is such an easy way to...

SPEAKER_01give good protection to vital resources.

SPEAKER_02And for those who's not familiar with it, who's listening, it's simply, describe it very shortly, it just removes the administrative access to the resources within. So even though if you're a global admin in the tenant, you'd lose all your access to the said resources you put into the RMA.

SPEAKER_01So it sort of protects those, right? It's sort of like a chest where you can, a restricted management administrative unit is like a chest you can think of. And then you're putting, you know, the most secure things into that chest or that locker so that not everyone can go and make changes to it, even though they might have the default permissions in the tenant. It has a bit more security applied to it.

SPEAKER_02Exactly.

SPEAKER_01Right. So you create the emergency access account, put them in an RMAU so less people can go and mess with that account.

SPEAKER_02Yes. And of course, you exclude them from all conditional access policies.

SPEAKER_01Yeah. And that's the hardest thing, right? To make sure that it's excluded from every CA policy and keep maintaining that.

SPEAKER_02You'd think so. You'd think so, but... I started off this year, 2026, with a new blog series on Agder in the cloud, where I do the idea concept, which is just small open source tools. And the first one I made is a PowerShell script, which does all this for you. Nice. So you can either create new break glass account, or you can just specify that these are my break glass accounts, and it does all the thing with Agder. assigning 502 keys, put them in RMEU,

design a global admin, and all that stuff for you.

SPEAKER_02So you can use it both to check the status or set it up.

SPEAKER_01Right. Perfect. And so it will go and check and make sure that it's all excluded from, you know, all the CA policies. So we'll make sure we include the links in this blog post, right? We will. Absolutely. Absolutely. Cool, cool. Let's take a quick break for a quick word from our sponsor for this episode, E-Now. In Microsoft Enter ID, gaps in application visibility can cause outages and approval delays. Expired app credentials disrupt integrations, while broad permissions

SPEAKER_01So you can prioritize the All right. So the way that you typically set up is you have

SPEAKER_01pass keys for this? Is that how you recommend? And do you have like two pass keys where two people have access to the pass key or you split out the pass key and the pin with someone? What are the ways you set up I usually advise my customers saying that the default recommendation would be to

SPEAKER_02have two break-loss accounts and each account has two separate, five to two keys. So keys, no, sorry, two accounts have four keys in total. But then again, you need to do an evaluation. I mean, how are you set up like organization-wise? Where are you physically located, et cetera, et cetera. So variations can be, but by default, I would say two accounts and four keys just to have the redundancy for it.

SPEAKER_01Right, right. Nice. I know some one company, they went to the extreme of they have a security key with a pin. So they keep the key in one place and the pin in another place. So like no one person has access into the account. You need two people or, you know, someone else needs that physical access to that. I know some companies that go to the extreme of even separating the pass key so that no one person has access to both the pin and the physical key.

They keep the physical key with one person and the pin with somewhere else or they

SPEAKER_01put the key in a safe, right? Or the pin in a safe and someone else has to unlock that. But yeah, but... You need to make sure that it's all available, right? Because the whole idea is you need to use it in an emergency. And then suddenly, if not all the people are available to get in, then the whole point of creating that is also lost. So you need a few redundancies if you are going to that extreme.

SPEAKER_02Yes, exactly. And that's usually something people don't really think much about because it's not a technical issue, you know. But what happens if your IT department is traveling to, say, Ignite, for example, they're on the plane across the Atlantic Ocean and then something goes down. You need to sign in. They are away. Who can do it? You know, they have to walk up that thread as well and make sure that.

SPEAKER_01Yeah. You need, if you are going to that extreme of splitting it all out, which is a good thing, you need to have lots of redundancies, right? That you always have someone who has access to those, you know, more than one person. So, yeah, that's definitely something to plan and think, which is not part of what you don't read in the intradocs. It's something that you need to come up, you know. But there are similar cases, I would say, with other sorts of emergency access accounts.

SPEAKER_01I know some people put it in CyberArk, et cetera, and do that. But one key thing is the logs, right? So does your script help with or at least check if the logging, et cetera, is set up so that Whenever the account, so the other half of the store is when the emergency access account is used, it should raise alarm bells, right? So one big part of the emergency access is when it's used, because there is no CA policies, it's an unprotected account. There should be alarm bells going off, like everyone should get alerted that it's happening.

And the logging is a really important part of setting up the logging and the alerts.

SPEAKER_01And then obviously like testing it at least once in... six months at least to, you know, make sure that it's still working. What do you, what have you seen or what have you set up? And does your script help with that?

SPEAKER_02That part is not part of the script, no. But I usually, there's a feature request that's noted. Usually I advise the customers to use what they already have because some people usually buy these services from a provider, you know. The CM solution like Sentinel or whatever the case may be. Just to make sure that they log any sign-in attempts with this account. And if that account signs in, it's pushing the big red button. Because that's actually what it is. Because like I usually tell my customers,

and I don't think many people pay much attention to the fact that a global admin

SPEAKER_02account has a carte blanche in the tenant. They can do whatever they want and they can bypass any security barrier out there. So they can do absolutely what they want.

SPEAKER_01Exactly. Yes. And you can stay hidden in the cloud as well, right? So those are the, if it's a malicious actor. Right. Okay. So we've set up the break class account. We've done all of that. Then we get started on conditional access policies, right? So let's assume we have, if it's a new tenant, test security defaults enabled, right? So you first need to go turn that off before you can configure,

SPEAKER_01start configuring the conditional access policies. Yeah. So where should we start from there? This is actually a long story because what I've done is I've started with the

SPEAKER_02framework from Microsoft because, you know, Microsoft actually has published a framework for conditional access on Microsoft

SPEAKER_01Learn.

SPEAKER_02And I read it and thought to myself that this is a very nice start. It is a term I like to use. It's very... American enterprise-y. Because in Scandinavia, where I lived, a small business in the USA is a huge company in Norway. It's a totally different scale. And the framework from Microsoft, while good, it doesn't scale down very well. It becomes overkill. And it's almost impossible to convince a customer in Norway to implement something which everybody can see is overkill,

SPEAKER_01right? So that's one thing I changed from that framework. And I had a long discussion with a former colleague of mine regarding this because we were discussing that it feels like when we're setting up conditional access,

SPEAKER_02we're always chasing what we need to block, what do we need to prevent, or what do we need to secure. And during that discussion, he made sort of a comment where he compared it to how different it is from, for example, a firewall setup. Because, you know, if you set up a firewall to your office, what's the first thing you do? You configure the any rule, which blocks everything, and then you add exceptions to it. And that got me thinking, like, why don't we do the same thing with conditional access? Why are we always chasing what to block instead of chasing what

you should allow?

SPEAKER_02So we kept on discussing that over time, back and forth. And I'm usually very focused on don't treat symptoms, but fix the cause underneath, you know? Don't do the consequences, but do the source. And I realized that The underlying issue here is that conditional access by default allows everything, you know, because if you sign in to ENTRA and there are no conditional access policies which touches your sign in, then everything is open. You know, you can sign in from anywhere. You can access any app.

SPEAKER_01There's no MFA requirement, no compliant device requirement, nothing. And there is no setting in ENTRA, you know, to switch it over to block by default.

SPEAKER_02So we discussed that a bit. And Fada, let's try to mimic that behavior. So what we do actually is that we use the framework from Microsoft because it's persona focused. So map up the different personas. You know, you have admins, you have users, you have guest accounts and what the case may be. Depends on what kind of company you are. And we assign those to groups and then we block everything. add in exceptions for the break glass accounts and the different groups.

SPEAKER_02And systematically for each exception from the block, we add another policy which does the protections. So for example, we exclude the normal user accounts because people have to be able to sign in. Okay. For that exception, a new policy, all users, you need to do MFA as a default. And on top of that, we just add more Features like require device compliance so we can switch off persistent sessions and so on.

SPEAKER_01Right. Yeah. So this is an interesting take, right? And I've seen this from what's documented in Microsoft is not to do block by default because there are lots of things that do break when you do block by default. There are lots of issues that do come up from there. So the general, if you see in the docs, the recommendation is not to do block by default. But I do know some companies that have implemented this block by default.

And I can see that you also, that's one of the practices that you are doing. Because when you do a block by default, there are lots of scenarios that do end up breaking.

SPEAKER_01Where you... You can't just only, even the exclusion things don't work because not all apps can be seen in the conditional access policy, right? So there are various types of apps that you can't even see them. And it might be a service principle or something that's being called out in the second tier from a client application to a service. And then that runs into issues with, especially with Graph API, because When you do a block call,

SPEAKER_01and then it blocks everything for graph as well, which breaks lots of different applications. But then what you're doing is you're excluding users completely from the policy, right? So which is a different take that I've seen. I've not seen people do that. They basically have block all and then they only try to allow applications that they are wanting to do, which basically means it breaks lots of things, right? You're going with the approach of,

SPEAKER_01okay, block all, you create a policy, but then you take users and then you exclude them from that policy, which then you're creating new CA policies and applying that. So your view of doing a block by default is very specific to only targeting the users.

SPEAKER_02Yes. And when you do the exclusion, they're completely excluded from those policies.

SPEAKER_01block all policies, which is good. Like, for example, if it's a guest by default, you know, if you don't exclude a guest, they are blocked from the tenant, even though they are added and they're not able to, won't be able to get to things until you exclude them and create different policies.

SPEAKER_02Exactly. And that is a very good point you're bringing up there. And yes, if you don't, or let me rephrase that. The reason this works is, as you are mentioning, it is persona-based. So we are talking about the users because M365 as a SaaS solution is very persona-focused on everything. Everything revolves around the user account.

SPEAKER_01Right. And I've been implementing this design for about three years now.

SPEAKER_02So it usually goes very well.

SPEAKER_01Yeah, I mean, it's a really good tip, right? Because I've seen this a lot. Companies will sync all users if they do the default config. They basically synchronize all the users to the cloud. Yeah. And not every account you had in AD needs to be in the cloud, right? And all of them become attack vectors, right? You might have shared mailboxes and, you know, various different things. And then when they create policies, I've seen that where they only target some of the accounts and create a policy saying,

SPEAKER_01okay, all user accounts, I'm going to apply this, which means all these other accounts that are synced, sometimes they don't have any CA policies applied to them. So by doing a block of all users and then excluding only the users who are allowed to sign into the cloud, you're sort of partitioning and making it very explicit, right? So until they are added to a specific group, they are blocked from accessing M365. Exactly. From the tenant, even if the account exists in the cloud.

SPEAKER_01Exactly.

SPEAKER_02And yes, I'm currently working with a customer now and I had several customers earlier who also synchronized their local admin accounts from AD to entry.

SPEAKER_01Yes, exactly.

SPEAKER_02I tried to tell them, do not do this because, you know, if that account is taken, the detonation is both on the premise and in the cloud. So it's two for the price of one for the attacker.

SPEAKER_01Exactly. Yeah. And the worst case is when they give that same synced account, permissions in the cloud, right? And it's one of the recommendations in if you go to aka.ms slash protect M365 in the doc, one of the first things there is make sure that your on-prem account is not given privileged roles in the cloud. They should be cloud only. And that lesson came from the whole Solari gate compromise that happened, right? Because They got into the on-prem by compromising ADFS and then they

pivoted from that. So you need to make sure that you contain users on-prem compromises from the cloud once.

SPEAKER_02Usually when I'm talking about exactly that thing, I usually use a description that every user account in your tenant is like a door into the room. So imagine I have this huge room and on the table here, I have some very important documents lying on the table. Every single user account in your tenant is a door into this room, which you need to lock.

SPEAKER_01That's a really nice. That's a good illustration. I haven't heard that one before, but it is a good one.

SPEAKER_02Thank you. Yeah. Anyway, which reminds me of another very important thing regarding that setup, because like I said, it's persona based. So all those accounts you allow sign into Entra comes into a group and that group really, really, really has to be protected with an error. Because if you, that's how I locked myself out of the tenant on purpose, which I told about, I deleted the groups for the admin accounts. So what happens then, they are always hit by the block rules,

so you cannot sign in.

SPEAKER_01Right.

SPEAKER_02So yeah, that works.

SPEAKER_01You know, the policy blocked you, right? So it saved you. Yeah, yeah.

SPEAKER_02So that's when you need the breakless account.

SPEAKER_01Yeah. And it's good that you had that and the block. So that's why the block is an important one, right? If you're not in the group, you're blocked, which makes it a lot more simpler. Whereas the reverse of that, what people do is they create a group and apply CA policies starting from that group or they leave gaps in the CA policy, right? Like they say, okay, I have this group and I have another group for another CA policy and somehow the user doesn't get added to either one of those groups and then they can just get

SPEAKER_01through, right? And going back to your metaphor, I would say the CA policies are like doors with keys. And each user is coming through a door, right? But the ones with no CA policies, it's like there's no door. They can just walk in.

SPEAKER_02Yeah. It's an open space. It's an open space.

SPEAKER_01Yeah. So that's a good metaphor to... explain it visually cool yeah so that's a good tip about making sure the users that you have in scope right others would say like let's always do all users and then apply the baseline policy which you can still do here as well you can to some uh degree uh it's hard to explain this without any visual aids so to speak yeah yeah

SPEAKER_02but i this is where the persona comes in pen and paper exercise more than the technical things, but it's really important for the design because you say the different personas. So what I usually do, I do CA and then two digits. So CA00, that's global, meaning this will touch all accounts. And you have CA01, that's admin, CA02, that's users, and so on. If your account is a privileged account or can be privileged to PIM, you belong into the CA01 group.

And that means that all conditional access polls is starting with CA00 global or

SPEAKER_02CA01, which is our admins. They will apply to that account, but you will never get conditional access polls from CA02, which are for end users. It makes it a lot easier to see which policies will apply to each account. And you can use the CA00 persona to apply to everyone. For example, blocking device codes or legacy auth or stuff like that, which you want to apply to all of them.

SPEAKER_02good advantage from this. When I write the conditional access policies, I use two digits. The first one is the persona. So like CA01 for admins. And then after that, I added a sequence number. It starts with just 00 and just ticks up for one for each. And that is to easily identify a specific conditional access policy when you're troubleshooting. Because if you are systematic in that approach. And every conditional access policy has a unique number in the start. I had a customer a couple of years ago, and they wrote a huge sentence as a description of what that CA

policy does.

SPEAKER_02And the only difference was at the end of that sentence.

SPEAKER_01Yes.

SPEAKER_02So I had to troubleshoot a sign-in issue there, and I'm going to the sign-in log, and then you see the first 25 or so characters in the name. That was exactly the same on all the different CA policies. So they all look the same, and I need to find a way to scroll all the way to the right to see which one was blocking it.

SPEAKER_01Yeah. And at that point, it's easier to look at the good and tell the difference, right? Because just reading it in English. Yeah. And like you, like I've had so many issues like that, trying to troubleshoot CA policies, like there's a long name and then there's some, they put within brackets, something to differentiate between the two, right? And yeah, it gets really difficult to work with that. So that's a good second. That's another good tip, which is try to have a unique name. And that way,

SPEAKER_01even when you have multiple tenants, right, you'll have a dev tenant, a test tenant, and a prod tenant. Using those codes is a way to make sure that, you know, they are similar, the same policies, but the actual users might differ in the different tenants, but you are at least using that sort of unique code to tell, okay, this is the policy, the intent of, you know, that policy in that tenant. So that's a good tip. That's also a nice thing I like with this design because as

long as you have those

SPEAKER_02two digits, then it is unique. So you can say that the sign is blocked by the policy CA01-02, for example. And that's only one policy that's called that. So you know that's as long as blocking it.

SPEAKER_01It's a lot easier to discuss, right? And tell people, oh, it's 0122, right? Instead of this one and you read the name out and it can get confusing. That's also another thing I usually say when we are in workshop with the customers

SPEAKER_02and we're discussing things like that. If I have someone in the room who's not technical, it could be a project manager or a team manager or something like that, what I usually do is I take up the list of CA policies for the customer on the screen and I ask that guy or girl who is not IT technical, Simple question. When you come to the office, you turn on your computer and you sign in, which one of these policies will affect you?

SPEAKER_02So if a non-technical person can evaluate that and say, I think it is this and this policy, then you've done a good job because normally people can't do that. So that's another way I used to tell people that your naming matters. So it has to be a system. It needs to be logical. And if a non-technical person can deduce that, then you're in very good shape.

SPEAKER_01Nice. And this is a tip anyone can take away, right? Like if you go to your policy, it's just a display name at the end. And if you have like all these random display names, you can always just go in and put in the codes and still leave the rest of the text. So you're not like changing things in that way, but you can bring order to your conditional access policies. If it's a mess today, you can go in and add them to the display name and bring some structure to it. Absolutely.

SPEAKER_02And that's also something I see all the time. What should I say? Like a mistake people do because they, you know, they're chasing things to lock down or things to secure. So they are writing like the name of the app. So they are securing one specified app from require MFA, but that can also require that you have to be in the office to access it or within normally at least and all that stuff. So there's another issue there that the name and the actual settings doesn't match.

SPEAKER_01Yeah, it would have started life as one thing, but then they were doing some troubleshooting or the scenario changed and you go and change the policy. Something that started out as internal MFA only for external. And then suddenly you are rolling MFA for everyone. And so you say, okay, apply MFA even to all users, right? Even internal location. But then your policy name would now say external. So it's hard to keep it in sync. And when you're troubleshooting, that can really steal some of your time.

SPEAKER_01True, true. That's true. Cool. So those are really good tips. Any other tips around the naming related?

SPEAKER_02Yeah. Well, what I do usually is you have the two digits I talked about, and I usually then write the persona, the target, and the requirement. So for example, that could be CO0100. That's admins first policy. I just write admins, so you don't need to memorize that list. And default require MFA. So you can... So you have some in note form, simple words, just explain what does this policy do. And I also had this discussion quite a bit, you know,

do you create few policies with a lot of settings or do you spread your settings to

SPEAKER_02many conditional access policies? I like to do a default for each persona. So you have a default protection for users, a default for admins, which is usually require MFA. And on top of that, I add more policies like sign-in frequency and disable persistent sessions and so on.

SPEAKER_01Yes. Yeah. And that's what I like to do as well. A lot of people go into a CA policy and then they just keep flicking a lot of different settings. And I'm like, don't go touching everything because with each thing you touch, it just changes what it's doing. You might be accidentally excluding various scenarios from the CA policies, right? So do the bare minimum. Keep your policies really simple. I prefer that way as well. Have the baseline and then have things, but they should do like only one.

Try to keep it to one purpose instead of doing multiple things like sign-in

SPEAKER_01frequency and this and the location and the risk, like putting it all into one policy purpose. makes it really hard and you can't partition, right? And then when you exclude a user, for example, now they excluded from so many different things when you're doing some other. Actually,

SPEAKER_02I had an issue earlier this week for a customer with this setup, and that was one user, I believe he was using a Mac. And for some reason... In this instance, when we turned on, I'm sorry, we turned off persistent session. So we said we don't have persistent session when you sign in. And that user kept prompting for sign-in requests.

SPEAKER_01Right.

SPEAKER_02If you had a lot of other settings in the same CA policy, it would be very hard to exclude them from that simple setting. Because when we switch off disabled persistent session, everything were fine for some reason. But a lot of other back users did not have that issue. Just that one guy.

SPEAKER_01Right.

SPEAKER_02So I don't know why. And another thing people, most people are not aware of, you know, because you have a conditional access position, excuse me. You know, you have users and you have resources which you take on, et cetera. And then you have those conditions, you know, user risk, sign-in risk, platform, all that. That list under conditions, it's a logical ant between them. So for a policy to apply, you need to match all those that you set. I see several times people go into that mistake. So they create a CA policy and they take off for,

for example, sign in risk.

SPEAKER_02And in the same policy, they also take off a user risk.

SPEAKER_01Right. But that policy will not apply until you both have user risk and a sign in risk.

SPEAKER_02And if you don't have both of them, then the policy will not apply.

SPEAKER_01Yeah. Yeah, so you effectively made the policy like very unlikely. Yeah, and that's one of the things that does need to improve, right? You can create a CA policy that effectively does nothing. It's very easy to make that mistake of creating a CA policy where you gave an example, which is a complex one, but there can be a simple thing as you include group and then you exclude a group And then like, you know, that include group is somehow in the exclude group through some

nesting and

SPEAKER_01effectively the policy is not doing anything. So there are, in Maester, we have a bunch of tests that try to detect those where you have scenarios where you're doing stuff with the include, exclude. The group that you included is nested in one of the other groups. So we try to detect those and say, look, the CA policy is not doing anything. You might be thinking it's doing stuff. So the risk thing is also a good one, right? So yeah, you need to really keep an eye on those things as you make

changes to the policies.

SPEAKER_02Absolutely. And that's where the what if feature in the portal is really nice. Yes. I like that one a lot because... Yeah.

SPEAKER_01And yeah, for those who like the what if, we did an episode two or three episodes ago where we went into like, you know, the what if you can't scale for all the different scenarios. So there was some tooling, et cetera, that were created to... basically go and run through every policy, like an offline engine sort of thing, and using that to find out. So I'll include those in the notes. So if anyone missed that episode, I had this one with, what was his name?

SPEAKER_01Emelian, Emelian Sokhi on some of the offline tools. So, yeah, you always need testing, testing, testing and regression testing, which is where the reason I built Meister was basically to do regression testing and see a bunch of CA policy tests that are there like that to see, you know, do you have a group? And if the group is deleted, right? For you, it was a reverse. But if there's a group and the group is deleted,

SPEAKER_01then that CA policy is again not doing anything. If it's targeting a deleted group.

SPEAKER_02Absolutely. But yeah, I like to use the what if tool to do some scenario. And in particular, before I enable the block all policy. Right. So I just want to make sure that if I, and then run a what if, if this account signs in, add me a portal from the web, from a Windows machine, and just check the list. Will the block policy kick in or not before I turn it on? Nice. So I don't lock myself out.

SPEAKER_01Nice. Cool, awesome. Yeah, and then we come to exceptions, like people exclude from the policies all the time, right? What's your rule around that when you have a CA policy and you have a group that's excluded?

SPEAKER_02Yeah, this is where I wish I had Visual 8, but if you imagine you have just a line, the M365 services, And on top of that line is a layer that's a block policy. It's like a layer above that line, which blocks anything by signing in. And from that block policy, you then have exceptions, you know, and also like holes in that layer. That's for admins, that's for break glass accounts, user, et cetera. So if you want to have exceptions from that layer again, and then that's quite normal, there are always some instances where you need exceptions,

SPEAKER_02then just think of it as a new layer, okay? Okay. We add a new layer, we make a hole through the layer to reach the M365 services in the bottom. That new hole needs a new layer of protection. The true benefit comes when you can systematically, for each exception that you do, create a new CA policy for that exception. So if a user cannot use MFA for whatever reason, can we do a device-compliant requirement,

SPEAKER_02for example? Or can we use device filter to lock it to a specific case? a device, like a meeting room equipment, for example. You know, you have those nice systems which lights up green or red if a meeting room is taken or not. They usually have to sign in and read the calendar. They can't do MFA, but if the meeting room equipment is registered in Entra, you have a device ID, which is unique. And then you can use conditional access policy exception from the MFA requirement, but say that for these meeting room system accounts, okay, they can only sign in from this device and then add the device ID.

SPEAKER_02And then you have a globally unique device, which is the only one that account can sign in from. So it cannot be abused elsewhere. Nice. And I implemented that on several customers. Nice. It's a little bit of work, but the end result is pretty good because meeting rooms and all that resources tend to be MFA excluded. Done. That's it.

SPEAKER_01Yes.

SPEAKER_02And anywhere in the world you can sign in with those.

SPEAKER_01Yeah, that's a very scary thing, right? And thankfully, I think that it's less of a need now, right? I think there are some newer ways for the Teams rooms to avoid that. But yeah, there are still, depending on how the application is written, et cetera, or if it's in a...

SPEAKER_02It's very, in my experience, it's very vendor specific.

SPEAKER_01Yeah, exactly. It depends a lot on the vendors and how they... implemented it and a lot of them take the easier way to do things right and say like you know just exclude from cj policies it works we're done yeah yes cool cool right then we come to protected actions yes it's a very underutilized feature it is i wrote a blog post about it a year or two ago to be honest i

was a little bit

SPEAKER_02frustrated I explore that feature because one of the other issues I see with conditional access are simply, as the term goes, there are too many cooks in the kitchen. Because anyone with security admin or conditional access admin, et cetera, can change, add,

SPEAKER_01remove conditional access policies.

SPEAKER_02I was looking for a way, how can we reduce that? How can we control who can actually manage conditional access policies or not? Because again, to the metaphor to a firewall in the office, you know, you only have one or two people who can access the firewall and no one else. But here, well, many admins can't. And the protected actions feature has some predefined rules, and one of them is managing conditional access policies. And that means that you can tie it to a separate conditional access policy. So you can say that in order to manage conditional access policies,

SPEAKER_02this specific conditional access policy will apply. And that's great because then you can scope it down and say that, okay, these two guys are the only ones who can change conditional access policies, no one else. And that's really good. I like that part. The problem is that if you have access to change conditional access policies, then you can also change protected actions. Yes. So if you're a conditional access admin, you can change the block, which will prevent you from changing conditional access policies, and then you can change them. So that was like so close.

SPEAKER_01So close. Yes. So let's see what the future brings and hopefully something can be done on that

SPEAKER_02part because again, there are too many cooks in the kitchen and humans are humans. So if you have a strict setup with a naming policy and how to set it exceptions like we discussed on this podcast. And if you have 10 people in a company being able to do changes to the conditional access policy, you can bet that at least one of them is going to deviate from the setup and it will over time just kill it outright. Right. Yeah.

SPEAKER_01So going back slightly to that question about exclusions, right? And these things come up all the time, right? Like someone, you create a policy for risk-based and location and suddenly someone is traveling and exec is traveling and they can't access. And, you know, there's escalations that you know, they've gone somewhere exotic and they're signing in and they can't get to their email and causing issues and so on. What's the process that you've seen companies do and what is your recommendation

for when you're having to have all these different exclusions and how do you make sure that there's a proper process set up or proper feedback of what should people put in place to avoid making lots of holes and then forgetting to close them?

SPEAKER_02Yeah, that's also another blog post I read. But what I usually recommend is that you need to acquire a P2 license and you combine the conditional access exceptions with access packages. And also if you have the NPDs. suite then you can actually delegate that to that person's manager without delegating any admin permissions so you get this self-service experience so for example i use if i go to spain because guys from norway like to travel to spain on

vacation it's a thing to see the sun right yeah it's to see the sun exactly

SPEAKER_02Like a typical Norwegian guy, when I have vacation, I travel to Spain and I cannot sign in because we have a geo block that restricts me from signing in from Norway. So what I can do either before I go or my manager could do it for me if I left without doing it is they can go into an access package and request access to a security group. which again is an exception from the geofilter and adds another conditional access that allows, for example, Norway and Spain. And that can be, for example, up to three weeks maximum.

SPEAKER_02And when that time has expired, then the access is removed automatically.

SPEAKER_01Because if you do it manually,

SPEAKER_02no one will remember to actually remove those accesses when they're done. So I found the access packages to be a good way to do it.

SPEAKER_01Nice. And it's all built into Entra and the user gets added and removed. So if you have E5P2, you can do a lot of that out of the box, right? And yeah, you have the self-service portal. So you do get all of those capabilities. So that's a neat thing, but you need to set it up when you're building the conditional access policy, right?

SPEAKER_02And not after the person. Absolutely.

SPEAKER_01Yeah. Because what typically happens is when people, when this happens, you just... The worst case is people just add individuals into the CA policy, right? And you don't want to be editing CA policies like that all the time. Or they create a group and then just keep adding people into the group. And then they never get removed from that group. So it just keeps getting bigger and bigger. So setting it up with all with a governed group, with access packages,

it should be part of that design process, right?

SPEAKER_01So you need to decide for every CA policy, are you going to have exclusion and then create that group? But how do you even convey that, right? Because you say, if you do it for a lot of policies, the traveling ones are good ones, like self-service, it's easy to understand and create the policies. But there can be other reasons why you would exclude people from certain things. You need to design it well, you need to create the access packages, and then you need to know which access package to go and apply to be excluded from

SPEAKER_01which group. That can get complicated, right? Have you seen how people handle some of those things?

SPEAKER_02Yeah, I had a customer a couple of years ago and they were very strict on delegating permissions in the tenant, which is a good thing. And they've actually gone through the work that they have added one access package for every single role in Entra. Wow. Named after the role.

SPEAKER_00Wow. So that list in, you go to my access and supposed request and that list of access was long.

SPEAKER_01Oh, right. Yes. Yes.

SPEAKER_02Least privileged, right? Least privileged, yes, absolutely. So that was a very fun thing to see. But normally what I do is that I try to tie them into the same naming standard as I do in the conditional access. So the groups who are relevant for an For a conditional access, they have the same digits, like I said. So it could be, for example, CA02-05 in the group name. So you know that that group is connected to that conditional access policy. And if you glance at the name,

SPEAKER_02you can see it is a geoblock exception, which allows Spain in addition to Norway, for example. So it's all about having a naming standard and use it across. But yes, it is a design question. And of course, some companies are very stationary and others travel a lot. And for those who travel a lot, this can quickly become quite complicated. And in Europe and the EU, we have specific rules for allow travel and work across borders

to The last customer I implemented this with, they said that we're just doing one for EU.

SPEAKER_02That's one package. And then we add more for the United States or India or Australia or wherever the case may be. So it's a case-by-case thing, really.

SPEAKER_01Yeah. There is a bit of overhead to... And if you go into different things, but the travel thing is sort of like a very common one and it's easy to explain and understand. But there'll be, I think, lots of other scenarios that you would have where you might want to temporarily exclude for certain reasons, right? Someone can't do device compliance. for, you know, they're doing some tests and whatever and they need to be excluded. But it's always good to have that whole time period and then

getting expired out of

SPEAKER_01that group so they're not permanently excluded. And that's where access packages come in because they are a really good feature for

SPEAKER_02exactly that scenario. And especially when travel and that stuff, I really like the self-service part and having the address suite license and you can also delegate it out of the box to, for example, managers. So they can do it without involving IT. It can be a huge time saving. So I like it a lot.

SPEAKER_01Nice.

SPEAKER_02Yeah, that's a cool one to have. Cool.

SPEAKER_01Awesome. Was there anything else?

SPEAKER_02I have recently got a very cool feature in Entra.

SPEAKER_01Yep.

SPEAKER_02The Entra backup. Yes. Which I believe you talked about in your last episode, if I remember correctly.

SPEAKER_01Yep. And I've tested it with conditional access and it works perfectly because I can add

SPEAKER_02just a simple user to a policy or just change a simple setting. And I can then use that feature to roll back and it changes, not just the entire policy, but changes within that policy. So that was really cool. So it's really nice to have. But of course, you should have alerting, monitoring and alerting for your conditional access policies. Again, imagine it, this was your firewall on your office network. If someone came into your firewall and started to change firewall rules, and you pushed a big red button,

SPEAKER_02and conditional access policies should be treated the same, if you ask.

SPEAKER_01Yeah, it's one of the things where everyone should know in the team when the policy is being changed.

SPEAKER_02Do you need to do anything in the tenant to turn it on? No, it's on by default.

SPEAKER_01It's on by default. Perfect. So... It's a daily backup which runs automatically and it saves five restore points. So you have five days of configuration you can restore from on an item level.

SPEAKER_02Nice. Yeah.

SPEAKER_01So if you made a change the previous day or the day before, there is something there now that you can go and quickly recover from if you made any accidental changes. I think deletes were okay. You have the recycle bin. The biggest thing that it brings is that any updates can be easily tracked, right? So I think that's a big one where if you, you know, went to a group and just removed a lot of bunch of people and you didn't know who they were, you can now easily restore it.

SPEAKER_01I mean, you can always go look in the audit logs, but it's a lot easier to see it from the backup.

SPEAKER_02Yeah, it's cumbersome and it solves one of the issues I was working on is how to make a good backup of conditional access policies because you can always export to JSON. But I never got it in a really good, reliable way for either restore or to recreate on a different tenant because I always had it 90% good, but never quite where I wanted it. So this solves a potential disaster.

SPEAKER_01Awesome. Perfect. So we'll definitely link all of your whole series on conditional access. There are so many blog posts that you shared. And I think these are good because you don't see all of it in the docs because a lot of these things are outside of the docs on how it's there technically. So this is what I love to learn from a lot of our practitioners and share that knowledge. So thank you so much, Pertorben, for coming on the podcast today and sharing your knowledge and

for all the blog

SPEAKER_01posts that you write. You are a very frequent person. author who's featured on Intranews. So thank you so much for your dedication to the community and sharing. Thank you so much. Thank you for having me. Awesome. Cheers. Cheers.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Which Passkey Should Your Users Get? The FIDO Alliance CTO on Passkeys and Post-Quantum Cryptography

    Nov 14, 202645 minAudio

    Microsoft is moving millions of users off SMS and onto passkeys, and most admins now have to decide which kind of passkey each group of users should get. Nishant Kaushik, CTO of the FIDO Alliance, the industry body...

    Credit the people on this episode

  2. Free AI Agents, the E7 Bill and AD vs Entra: The Workplace Ninjas US Special

    Nov 7, 202625 minAudio

    AI agents are arriving in every Microsoft 365 tenant, and the questions admins ask first are what they cost to run and what it costs to secure them. In this Workplace Ninjas US special, four of the event’s speakers...

    Credit the people on this episode

  3. Entra Multi-Tenant App Mistakes Every SaaS Builder and Admin Should Know, with Kelvin Tegelaar

    Oct 31, 202643 minAudio

    Most SaaS vendors connect to your tenant with one multitenant app and one credential, shared by every customer. Kelvin Tegelaar, founder of CyberDrain and creator of CIPP (used by well over 10,000 MSPs), sees it from...

    Credit the people on this episode

  4. Conditional Access Gaps and the App Back Door, with Brandon Colley

    Oct 24, 202639 minAudio

    Most Conditional Access gaps aren’t exotic. They come from reading policies the wrong way: as firewall rules with an “allow”, as a list of platforms that seems complete, as an MFA exception for the office that made...

    Credit the people on this episode

  5. Stop the Bleeding: Cleaning Up Apps, Secrets and Consent in Microsoft Entra

    Oct 17, 202651 minAudio

    Most tenants have the same problem: hundreds of app registrations and service principals, client secrets that were set to expire in a hundred years, permission grants nobody remembers approving, and test tenants that...

    Credit the people on this episode