In this episode, I sit down with security researcher Katie Knowles to unpack the hidden layers of identity systems inside Microsoft Entra. We get into real-world attack paths like backdooring service principals, restricted administrative units that can accidentally create unstoppable accounts, and OAuth phishing in Copilot Studio. Katie also shares how she approaches deep technical research, what defenders often overlook, and why identity security is only becoming more complex. This is one of those conversations where you walk away thinking differently. Subscribe with your favorite podcast player or watch on YouTube 👇 About Katie Knowles Katie Knowles is a Senior Security Researcher at Datadog specializing in Microsoft Azure and Entra ID security. She has extensive experience across security engineering, penetration testing, and incident response. Katie is known for her thorough research that connects complex technical vulnerabilities to practical defensive guidance, publishing regularly on Datadog Security Labs and speaking at major security conferences. LinkedIn - https://www.linkedin.com/in/kaknowles/ 🔗 Related Links * Katie’s Datadog security posts - https://securitylabs.datadoghq.com/articles/?author=Katie_Knowles * Katie’s personal blog - https://kknowl.es * Katie’s conference talks - https://kknowl.es/external-content/ * Creating immutable users through a bug in Entra ID restricted administrative units - https://securitylabs.datadoghq.com/articles/creating-immutable-users-entra-id-administrative-units/ * I SPy: Escalating to Entra ID’s Global Admin with a first-party app - https://securitylabs.datadoghq.com/articles/i-spy-escalating-to-entra-id-global-admin/ * CoPhish: Using Microsoft Copilot Studio as a wrapper for OAuth phishing - https://securitylabs.datadoghq.com/articles/cophish-using-microsoft-copilot-studio-as-a-wrapper/ 📗 Chapters 02:08 The Immortal User Bug in Restricted Admin Units 04:23 Attacker Impact: The Un-deletable Malicious Account 05:59 Hacking First-Party Apps & Bypassing AppLock 09:29 How She Found the AppLock Bypass 11:16 A Day in the Life of a Security Researcher 14:20 Phishing with Copilot Studio & OAuth 17:00 Top Tips for App Governance & Security 21:45 The Hidden Risk of Azure Key Vault Access Policies 28:55 App Registrations vs. Service Principals Explained 41:48 The Future: Agent IDs & The New Trust Model 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_01From the latest hacks to cool updates, join the ride home.
SPEAKER_00Hey, folks, welcome to another episode of InterChat. And today I have a really, really interesting security researcher, Katie Knowles. She's written some amazing blog posts. She works at Datadog as a security researcher. And whenever Katie posts a session that she speaks at or writes a blog post, I always take the time to read it. Because I always come off learning something new. And even on topics where I work on Entra Service Principal Apps
quite a lot.
SPEAKER_00And the research that Katie does is always very interesting. She does a very thorough job at some of these things. I end up learning something new even in those topics. So I really, really had to get Katie on EntraChat. Welcome to the show, Katie.
SPEAKER_02Thank you so much for having me. And thank you for saying that. That's the goal of what I do is to make sure it's explained well. So I'm glad you got something from it.
SPEAKER_00Awesome. Yeah. And the thing I like about what you write is you show the research and you also explain how, you know, from a defender side as well, as you know, an admin, what they can do. Like you complete the whole story, not just only on the the research bit. So that's where I find like your storytelling, it covers that complete arc.
SPEAKER_02Yeah, I've been on both sides. I started out more in security engineering on the security side of things. I've been a pen tester. I've done incident response. It always bothers me when the tech doesn't connect back to how to actually fix it or resolve it. And I That's pretty much my goal when I'm doing research is to take really complex technical stuff and find a way to connect it back to what do defenders need to know, but also how can I explain this beyond the docs in a way that'll make sense to
SPEAKER_02people.
SPEAKER_00Tell us about the, you know, the restricted administrative units.
SPEAKER_02Yeah, absolutely. So the background to that one is that I actually started out trying to learn more about roles and role assignments within Entra. I had just started as a security researcher. And my first project, my manager said I could learn whatever I wanted. And I just really wanted to understand roles. And I was just looking at the API calls for what felt like months. I don't think it was that long, but it was still quite a lot of digging into the details. And The administrative units specifically, they were constantly being mentioned,
but I didn't see very much context on what they did or how they operated in a
SPEAKER_02security context. Less from the defensive perspective, more from the offensive perspective. So I started playing around with that a little bit. And when I was automating, actually, one of the use cases... to potentially protect a malicious account, like an attacker might try to persist using administrative units by protecting the accounts that they had in an environment. the restricted status wasn't clearing. So it led to actually two really interesting topics. One was the concept of using restricted administrative units at
all from an offensive perspective and that you should be aware people can protect accounts and
SPEAKER_02make them immutable in this way. But then secondarily, there was this race condition where if you removed a user from an administrative unit that was restricted and then you deleted that administrative unit very quickly, the status would never be cleared. Something in the way the cleanup process was happening meant that the user would stay restricted forever. And you could undo it by putting them back in a restricted administrative unit and cleaning that up. Well, who's going to know about that?
SPEAKER_02So it was definitely a funny one to find. I think I was sitting there, you know, clicking and testing and being like, this can't be right. Why is this happening? Yeah. I think the findings I've had thus far, at least, it's been very much you work really hard trying to find something that seems very cool and impactful for a long time. And in the end, it's just one silly bug. You open your eyes to it and you're like, oh, it can't be this. All right. But it's hard. Software is hard. Yeah.
SPEAKER_00So in that particular one, like what can an attacker do with that so they can put a user and delete them in and then, you know, clear that, delete the administrative unit? Yeah, that's a great point. What are the interesting things they can do after that? Yeah.
SPEAKER_02So the impact of this, similar to using a restricted administrative unit to protect an account, you'd want to come back and use again. Maybe you want to do malicious activities, but it takes the team a lot of time to figure out why that account can't be deleted, its sessions can't be contained. They have to take it out of that restricted state first. And this just... makes the issue even worse by making an account immutable or restricted for an extended period of time. There's this bug where you don't really understand why that user can't be removed.
SPEAKER_02You're going to have to keep figuring out, you know, why is this malicious user not something that even a global admin can touch right now and how do we fix that? before you're able to contain the user.
SPEAKER_00Awesome. Nice. And that's, you reported this one, right?
SPEAKER_02Yes. Yeah, that one got resolved. So that shouldn't be the case anymore. That was exciting to get to work with the team on.
SPEAKER_00Nice. Yeah. And that's, this is the sort of thing that really interests me, that you were able to do this unique thing and find a bug, which... which would make it hard because like I've had instances where someone would reach out to me and they were like, this, you know, doesn't work the way it should work. Should it be working this way? And yeah, I always redirect them to MSRC because that's the right place at Microsoft to investigate this. And tell me about the recent one,
SPEAKER_00you had a talk about, you know, the first party apps and how you were trying to add, um,
SPEAKER_02Absolutely. There's been some fantastic work done on this before. Just to say it, obviously, Durkian did great work on this, or Durkian Malema. Eric Woodruff also had some really interesting work that actually helped me understand app registrations and service principles as separate concepts effectively for the first time. So I'm really thankful to him for that. What I was curious about is whether it was still an issue. Obviously, there had been a lot of cleanup on different applications, but there might be specific apps.
And also there had been talking about the impact of if there is a first party app.
SPEAKER_02So to go way back on the background here, let's say there's a Microsoft service principle associated with a Microsoft app registration. So it helps people. create that connectivity, all those features that we need in Azure and Microsoft 365, all these different services that are glued together to look like one thing on the surface. It's like a very clever visual trick that you believe it's one app when you're interacting with this galaxy of different software under the hood. And it turned out that one of the common applications could
still have a credential
SPEAKER_02added to it in a local Entra tenant. So let's say I've got this one service principle that performs operations in my tenant. And if I'm a privileged user, I can still add a credential to it and then kind of impersonate that app or hijack it, we'll sometimes say, and take actions as it with whatever permissions it has. In this case, because it had application level permissions available, To add trusted domains, you could actually add a federated domain backdoor, which was another topic where I think there were a couple of posts.
SPEAKER_02Nestori Cinema had really good context on it from Azure AD internals. But I think if I'd been coming at it from a practitioner level, I might not have understood immediately what's the risk, what's the impact, how would someone redo it. So I was really excited to get to illustrate both those scenarios, backdooring an application, and then also that federated backdoor scenario. What does it mean when someone can add a trusted domain and really abuse that in your environment?
SPEAKER_00Yeah, so with the backdooring, I think even during with the SolariGate, the attackers used that method because they took like Microsoft First Party apps, which had permissions already assigned, and then they would add credentials to those inside a customer tenant. And then they would stay hidden, right? Because you wouldn't know that credential was being used by them. So Microsoft introduced this feature called AppLock, and there's a flag that blocks those service principles from
being edited.
SPEAKER_00And even first part, like not just Microsoft, even other developers who are building apps can do the same thing to the app. They can turn on AppLock so that in their customer tenant, there are certain properties that cannot be edited. Yeah. So that sort of rolled out, but you did find in your latest research that you could still do, but you had to jump a lot of hoops to be able to add those keys and get the tokens. But so that was very interesting.
SPEAKER_00Like, how did you figure out that? Like, I was listening to your talk on, you know, how you added a key.
SPEAKER_02It was the Office 365 Exchange Online, I think, was the display name for me, at least at the time. Really, I was just curious what would stick. The app lock for credentials on service principles is a really fantastic enhancement. Yeah. And I think it also starts shifting the conversation to how we can, how as people consuming applications or environments consuming applications, we can control the risk of trusting them,
SPEAKER_02which is kind of that next frontier, right? We think about things like sales loft that just happened with theft of more credential material for more trusted applications. There's a billion different ways to do it, but it all comes down to how can you limit that blast radius of apps you trust, right? Back to your question, though, I just added credentials to everything. I just scripted it. I tried slapping a password on everything or a secret, I should say. That didn't work with anything that had interesting permissions.
But this one service principal came back with an error that said, hey, this isn't a certificate.
SPEAKER_02I want a certificate for authentication. So I automated that. And then in this case, the certificate authentication was still accepted. thing would be a little more complicated for an attacker to do. It takes a couple more API calls to create a certificate and attach that. But once you've automated it, it's pretty simple to repeat it. It's also very easy to share the finding so that it can get fixed, right?
SPEAKER_00Right, exactly. Yeah, so that for me is interesting. I think a lot of maybe the audience with admins don't really know what a researcher does so how do you spend your day like you said you tried adding to you know secrets to all the apps so what's a typical day for Katie
SPEAKER_02Yeah, I mean, my day is built around the goals of looking to increase the knowledge of our customers about security and then looking to improve how our products handle security and our internal security as well. But just all around Azure, around all things Azure. So typically every quarter I'll have a topic or two that I'm looking into. Some of them won't go anywhere, but they might lead to thoughts or ideas that are useful later down the road.
SPEAKER_02I might be looking at my RSS feeds for what new features are coming out, what looks interesting that might not have been talked about before in a security context. So new authentication types, federated identity credentials I know came up recently, or external auth methods. How many different ways can you authenticate into a tenant that are really useful ways? Obviously, somebody needed them, right? We wouldn't have built them otherwise. Yeah. But the implications of those might not be understood if you're looking to lock down an environment yet. And so can those be illustrated better?
SPEAKER_02Can we build protections for that into the product? Things like that. Yeah. The way that once we've got a topic, though, it's all kind of out the window. It's a lot of staring at API calls, clicking around the portal, seeing what different activity is happening under the hood to understand, OK, I click this button and a lot of work has been done to make me feel that I'm just using an application or that I'm just clicking a button, but that could mean five different actions.
SPEAKER_02What are those? What are the different parameters of them? What does Entra look like from an object-based perspective specifically? So I'll be digging around in that a lot. There's a lot of like zooming in. How does this work? What's going on here? And then zooming out. That's the part that can be a little trickier sometimes is what are we looking to get out of this? How can we help people with all this crazy arcane knowledge we've uncovered?
SPEAKER_00For me, it was fascinating that the whole research side of the house looking at how you go learn and look at the published docs, but also dig under the hood into how things work. You keep trying the different ways to try to break that.
SPEAKER_02There's also aspects of how things should be versus how they are. I know some people really love anytime there's like a warning box on a piece of Microsoft documentation. It could be nothing. It could be an area of risk that needs a little more articulation or needs to be proven. What exactly does this risk look like in the real world? And then if you can demonstrate that to either customers or to MSRC, then we've got a better conversation about, is that the way it should be right now? Are we comfortable with that risk right now?
SPEAKER_02Exactly.
SPEAKER_00Absolutely. So tell us about the one about the co-pilot studio. You sort of combined some of the existing research that's been published about OAuth phishing.
SPEAKER_02Yeah. So in this case, to go back to the universe of Copilot, there's a lot of different things that that can mean at this point, which is exciting. But from a security perspective, it can be a little confusing. We have Microsoft 365 Copilot. We have, I'm sure you know all the different names better than I do at this point. But Copilot Studio specifically allows the creation of what's essentially
SPEAKER_02Power automations, it's a similar like power, I think it's virtual apps. Correct me if I'm wrong, but this sort of low code, no code flow, but the AI can be added into it. So you can still take the actions that you might have in that service. But in the context of now we have AI, now we can build a chatbot very easily, but it's still customizable. So users who are accustomed to interacting with, oh, you know, I've gone to ChatGPT's website or I've gone to Microsoft
Copilot and I'm talking to
SPEAKER_02it and it's just one thing that I can trust. Versus maybe landing on a customized agent, it's got the flexibility, maybe not the flexibility of SharePoint, but you can put pretty much whatever you want in there. You can have it say what you want. You can create your own links. And one of the methods is you can also prompt users to authenticate either through your own services. Maybe you want to create a third-party connection to say, okay, log into an airline application or something. We'll bring the token back, and then it will be able to assist you.
SPEAKER_02or through EntraID. So by configuring an application outside the user's organization as that login parameter, you can say, hey, I want users to log in through this app that I've created. And when they go to click that login button, it'll redirect them to a phishing attack. So a second type of trickiness going on here. So we've got kind of tricking the user, we've got phishing, but then we've also got that OAuth phishing component where the app, if they choose to consent to it, will have access to their data and whatever they may have
consented to within the
SPEAKER_02allowed policy for their company. So again, it gets a little more complicated over time, which is good, but there's still some different ways that users might not know about.
SPEAKER_00Right. So what are some tips you have for around like, you know, the whole OAuth And even earlier, we spoke about the service principles and governance in that area. We've had a few episodes on app governance and how important it is. But a lot of admins still lose that context on how much you're giving access to apps and what are the things to look out for. I think adding apps into a tenant is a given. Like as part of doing business, you do need to add apps.
SPEAKER_00Your users need to be able to use those applications. What are the things that you look at it from a research perspective and you think like these are things that admins should know about and be aware of?
SPEAKER_02Yeah, I'm sure it's been mentioned before, but the user application consent policy is defense number one. Microsoft's policy, the article that you just mentioned that we just talked about, I needed to make sure I published that before Microsoft's policy got so good that I had to rewrite the whole thing. So it's obviously getting better. There's more sensitive permissions getting included by default as saying, hey, you need an admin to approve this request. And that's really helpful. Obviously, you can create your own policies within a tenant for what
you're comfortable with.
SPEAKER_02And that can be really helpful. The reality of applications can be really tricky depending on how big your environment is, how much connectivity users expect with new applications. So it's good to be realistic about that, but also know that once an app is consented to, they have access to that user's data or they have access to your tenant data in the case of an application permission. And it's basically like a service account is a dirty word, right?
SPEAKER_02We don't want to use that too directly. Yeah. But there are still service account type use cases that need to be supported. So future controls, the ability to lock down adding passwords to local service principles, that's really exciting. The app instance property lock. Other controls like that over time, I would be really excited to see, like, how do we expect this application to authenticate? If it's performing delegated, usually like delegated permission context with a user,
SPEAKER_02does it need to have the ability to sign in on its own? Things like that. That's... I am not necessarily an identity system designer yet, but it's always on my mind. The more I get into these topics, you know, you wake up in the night and you go, hey, yeah, how do you fix that? Oh, that's a tough one. It's just the troubles of technology, right? We have to trust each other to some extent to get things done, to make things possible, especially the bigger your company, the more things you do,
SPEAKER_02the longer you've been operating. But We also have to figure out where that line is on security and how we can also just where have we not thought through the implications of it because it's just tricky to build these things.
SPEAKER_00Yes, yeah. One thing I do notice as companies get bigger is they get siloed and you have different groups focusing on different things. But then that's where some cracks appear, like one group thinks. So it's not my responsibility and it's someone else's, like the... intra-admin team that does just operations. They're like, oh, security is not my thing. I'm just going to, you know, do the app work that people want me to do. And then on the other side, you have security teams, but maybe they're not really focused into intra and,
SPEAKER_00you know, looking more around the psychops and other side of things. So I've noticed that happen.
SPEAKER_02Yeah, it's very difficult to know everything that's going on. I think a lot of us would say that about the companies we're at. I think even kind of like the Microsoft ecosystem is a great point with that. I don't know if you remember it, but there was a blog, the old new thing, a while back covering a lot of Windows. Yeah, like Windows investigations. And a lot of the times it was like, What is going on here? How did this happen? But there's just it's so complicated. Nobody knows it all. And making sure that there's somebody on the security side
looking out for,
SPEAKER_02you know, not just what are the hypothetical risks? How can these actually be used? What might be a better way of thinking about it? Things like that can be very helpful.
SPEAKER_00Absolutely. Yes. Right. So you focus a lot on the Azure side as well, right? And there is a lot related to Azure and roles and some of your initial research was around that. What were the things that sort of like were really new to you, like what surprised you when you started looking at roles. Like that whole area with roles and when you add PIM to the mix, it is very, very complex. And then in Intrad, apps also can have roles as well.
So you can have a user or a service principal having roles and it gets really
SPEAKER_00complex when you add all of that, you know, the Azure layering of that as well. what are some of the things that were like popped out to you when you were doing this research?
SPEAKER_02Yeah, I think there was something with Azure Key Vaults previously as well, where there was a certain resource deployment. And I think that one was considered by design, but it's not uncommon, right? There's areas where Security gaps might be different depending on who's looking at it. But a user that had the ability to write key vaults that said that maybe they shouldn't have the ability to look at secrets, but they would be able to modify the access policy if the key
vault was using an
SPEAKER_02access policy. So this is, again, one of those things where if you are using Azure Resource Manager's RBAC roles to handle your key vault access, There's no issue. There's no ability to see the keys in that way. But if access policies, which are a separate form of access control for the same resource, if they're in use instead, just a list of who's allowed to do what, that's kept on the object, the resource that is the key vault. And if you have the ability to write to that,
then I can now write in that I have the ability to access secrets and go in and
SPEAKER_02view those secrets automatically. So I think in that case, I don't know if it's changed at the time it was considered to be more the design of the role can't necessarily be helped without implementing more complicated policies. And then pushing towards that move to, OK, but maybe you should use the consistent roles instead. But there's definitely some resources that will use the access policies, I think, for ease of use or perhaps like features in RBAC that aren't covered yet. And that's just the way it goes sometimes.
SPEAKER_00Yes, yeah, like I was doing the Microsoft Security SCI certification recently, just doing the exam for trying it out. And I found it really hard.
SPEAKER_02Yeah, there's definitely a tricky bit, I think, with those things. almost like those Lego type services, right? The ones that get relied on by other services in time, or you go to make a deployment of something and it uses Key Vault as well, where issues with those services, it can be really tough not to rely on them. On the one hand, maybe people should migrate to managed identities wherever possible. They should be using the RBAC-based control and make sure that that identity has
SPEAKER_02the right control. But it can take time to get that all the guidance through for that, get the redesign through for that. Um... Yeah, I feel silly now that I'm the researcher arguing for it takes time to secure things. But it really does. I think immediately before this, I was in a company of over 400,000 people trying to look after their security, looking at their Azure environments. And you can have a lot of very noble souls questing for security. And still,
SPEAKER_02all you can really do is try to make sure you're focused on, you know, what are the highest risks we're trying to protect against. It's definitely not easy.
SPEAKER_00Yeah, it's not easy when you have business on one side and they want to get things done and, you know, be productive, which is like, you know, do the business, which is why the company exists in the first place. And you as security are trying to make sure it's done properly. in a safe way, but also not impede the business, right? Like impede their rollout and so on. So it's always very delicate and you need maturity on both sides to know, you know, when,
SPEAKER_00what gives a little bit and then, you know, going back and making sure you fix things up as well.
SPEAKER_02Yeah. Related to that. Not to twist the conversation sideways a little, but there were a couple of posts I put out last year on my personal blog, which it's just my last name with a dot before the E-S. Or no, it's K-K-N-O-W-L dot E-S. But... One was a set of resources for protecting against application risks, things like that. I did like a virtual talk for RSA on that and all the slides and resources are there.
SPEAKER_02Really good reading lists if anyone's on the defending side. The other one is a how to... Look through your Azure resources with the KQL resource explorer and query them for areas where you might have security issues. So exposed ports, misconfigured storage, databases that allow public access, things like that. When I was a defender, I really loved these because it can be very difficult to find the right people to talk to about security risk.
And they might have already come to their own conclusions in different ways. But if you can get read access to your environment to help understand what
SPEAKER_02what might be going on, and you have KQL, then you have everything. You can go and say, okay, well, I know that there are this many VMs with public IPs exposed to the internet. Maybe some of them have exceptions. Maybe some of them don't. But can we talk about that? I have the data now to start a conversation. And I found that to be very helpful to at least find the right person to ask on different security issues when I was trying to figure out how to prevent some of the things that I'm now trying to
think more offensively about yeah it's fascinating when you make that switch from yeah the defensive to the offensive side used to change when you cheer yes that's true yeah what what before would make you unhappy now you're like yeah i found a way yeah yeah and then i'm unhappy i'm like yeah and i'm like no that that
SPEAKER_01shouldn't happen
SPEAKER_00Yeah, I had Durkan on the last episode and he was like, when he found the whole actor token for exchange. Yes. Yeah, I found it and then he was like, oh no, it's like, I don't want this responsibility to...
SPEAKER_02Yeah, I know you mentioned that stress rising. I think kind of similarly for me, if I find something more interesting, not that I found anything that stress inducing, but definitely there's an aspect of did I do something wrong? Did I did I trip on this in such a way that it's not that this can't be true before you're able to fully validate all the details, get those on paper. It's very definitely adrenaline inducing.
SPEAKER_00I love the way when you do your presentations, you have all these visual illustrations, the way you explain it in those texts. I really like how you explain some of those. So one thing that I was watching was the relationship between apps and service principles and how when you make changes in one, they get synced to the other one. but not all of them. And like there are some unique things you found out.
SPEAKER_00That's always a topic that everyone gets confused about. Can you share a little bit about, you know, the research you did and how you were able to find it? Because a lot of people, I know would just read the docs and then, or they would try something and, you know, that's the extent where they stopped. But you went ahead and you scripted it and then you try doing the changes to see what is really happening. You like, you take the extra time as a researcher. And I think it's time that defenders don't have, like they need to get stuff done and move on.
But you have, you had the time to try things out and like, you know, get to the bottom of
SPEAKER_00which of the properties are syncing, which are not, and so on. So that's something, like, even for me, I found that useful.
SPEAKER_02Yeah, I definitely think it's a process of cycling inwards or spiraling inwards towards understanding on different topics. There's always going to be more below the surface to scratch. but I still don't understand where it comes from, right?
SPEAKER_02The underlying OAuth model. So now we get to go back. We get to go to the RFCs after the Microsoft docs, after the portals explanation, all these different terminology to create this connection and really try to understand, you know, what were people thinking when they built this? What is this feature meant to support? I really like asking those kinds of questions. I take a lot of notes, but I don't necessarily... Come back to them. Sometimes I do. And I think, oh, my gosh, these are the scribblings of some crazy person.
SPEAKER_02I'm glad I have them. But I also it's different mindsets. I think you have to kind of let go of. You have to let go of words and go into the topic and just be interacting with the APIs. So I use a lot of Burp Suite repeater. It's basically like making different curl requests to different endpoints, the equivalent of that, to be, okay, when I change this, what happens? When I change that, what happens? Yeah. How is this designed and how does it behave based on how it
says it's designed?
SPEAKER_02And then coming back with that automation, I think that also being able to do something quickly and repeatably can help uncover a lot of issues you wouldn't have expected. I... I feel really silly admitting this on an Entra podcast, but I don't use much PowerShell. No, but I've seen the Python scripts you've written and they are like way more awesome.
SPEAKER_00Anyways.
SPEAKER_02Well, thank you for saying that. It's very messy code on my laptop. There's a lot you don't see. But I did want to use that as an opportunity to really understand what are the endpoints, how do they interact with each other. I could use a library or I could just get used to working with the HTTP endpoints myself. And that's just led to some really interesting stuff. Like I've not had anything to show for it yet. But interacting with the login process, login, Microsoft online dot com,
SPEAKER_02whatever, whichever that URL is. How does that work? What tokens are used in what places for what purposes? And I think those kind of asking those kinds of questions in time can lead to a greater understanding, like not putting pressure to understand it all at once. On the flip side, when you're researching, there's not as many people who can check your work. So you'll have groups of other people in the entry community that you can ask. You'll make friends along the way.
SPEAKER_02But you also have to get used to doing a mathematical proof almost. How does this actually work? What does this endpoint actually respond with? In what timing? How do I know this? How do I know that? Yeah. When you're on the side reading the document, it's very easy to forget that the path is not always clear for the person who wrote it. So when I say that I saw a tool like Azure AD internals and I didn't understand all of the concepts in it, I don't know that anybody does in a security context at the
level that the author
SPEAKER_02does. And there's a lot of other things that they might be focused on, any tool really. Yeah. And taking the time to understand that and translate that, it really does. It takes time. It takes decades of experience. watching the technologies grow up, really understanding them. And yeah, I don't know what else to say. I find it really fascinating for me. Doing research is something like archaeology. There's going to be different layers of just different layers
of definitions and terms that have changed and features that got added over time to the point where
SPEAKER_02things get migrated from on-prem Active Directory into Entra. And you're wondering why that's still there, but somebody must still be using it if that's the case. So there's always something more to be learned. And in short, I get a little too excited about this specific topic.
SPEAKER_00Nice. Yeah, I can certainly tell. So on the research you've done on the apps and service principles, right? You found out, like, what is your explanation, like, from what you've done? How would you explain apps and service principles? Like, I want to get, like, the different perspectives from someone who is, like, an admin or a developer, right? Like the admins to devs, they're very different views of what apps and service
principles are. And I want to hear like how you as a researcher see apps and service principles and
SPEAKER_00like the relationship between them.
SPEAKER_02Yeah, I mean, correct me if I'm wrong here. A little bit of a pop quiz for me. But the way that I see it, at least an app registration is something that I'm going to create when I want to provide some kind of service. It might be in my tenant. It might be in other tenants. It might be a template, but we don't necessarily need to touch on that right now. But I want to do something and I need to define what the thing that I'm doing needs in order to operate. And then that definition is going to be the app registration.
SPEAKER_02It's going to be the overall application. It's going to have the client ID or the application ID as sometimes I think both known. But then it needs that identity component to really make it go to have something that can have the secrets associated to it, either to build trust with the users that you're getting your delegated access from or for direct access in the case of more application style, like service account type access. The thing that people don't always think about,
SPEAKER_02kind of that we touched on earlier, is that especially if something has application level permissions, it's going to be entering your environment as service account type access when you trust it in that way. So you just want to make sure that you're being careful about that, especially when it is one of these applications that might be in multiple different environments. Really, any application, the way that it accesses your environment, you're trusting it. But especially situations where one identity might be accessing
into a lot of
SPEAKER_02different environments, you want to make sure that you're aware of that. You want to make sure that you trust the relative security of the tenant that that identity lives in. Because we've seen some situations recently where they make a really good pivot or a really good first foothold, right? I know that one application lives here and I know that other people are using it. And how can we move between environments using that trust?
SPEAKER_00Right. And you did the research of like, let me change the display name. And then you saw that it gets synced behind the scenes from the app to the service principle. Like for me, that was very interesting, like how you tried hitting all those different properties and testing out which ones, you know, got synced, which don't, because those are things that are not like documented clearly as such. And the behavior can change as well.
Yeah, it can definitely change over time, specifically testing all the properties. It's also one of those things where you go through and you do it and you might not
SPEAKER_02even remember after doing it, which ones were that was that again? Why was it that way? You mentioned I looked into properties. I can't remember it. I'm glad I wrote it down. You know, this is the curse of research as you go so deep into something. Trying to think without words about the topic and then you come out, you have to define it all again, put all the words down and then kind of start from a blank slate. It's like a fresh, you learn the fundamentals better, but it's like a fresh page every day or every project with these things.
SPEAKER_00You did a visual on that in one of your talks. And that's what struck, like stuck for me is you showed like which one synced through, which one didn't. And things like the credentials were not really the ones that don't sync across. And that's where you were able to like add secrets into the service principle in the customer tenant. Yeah.
SPEAKER_02Thank you for reminding me of that. Yeah, in this case, it was confusing to me, right? Some properties on an app registration and a service principle are the same and they sync. Some are different and obviously they don't sync because they're different, but some are the same and they can actually have very different values. And I wouldn't think of that without realizing it. I think that was probably why I kept getting so confused initially when a lot of Service principle hijacking research was coming out.
SPEAKER_02I was on the defending side, didn't have time to test it too much. And I was constantly wondering, what do you mean? You know, obviously this property can be changed, but I don't have time to verify that. And I think that's one of the reasons as well that I'm always thankful for follow-on research is that somebody paves the way. Somebody points the direction to say, hey – This isn't understood as an issue or this might be an issue we haven't thought of before. And then getting different explanations, different voices over time so that it can finally,
SPEAKER_02hopefully make sense. I know there's that one John Saville video of application registrations and service principles where he's kind of like biting his nails. I must have watched that at least five times now. I'm like, I still don't get it. What does it mean?
SPEAKER_00Yes. Yeah. It is a very complex topic. And because the multi-tenant part of it makes it even more complex. Like you try to wrap your head and then you understand, okay, in one tenant, I create an app. And within the same tenant, you have the service principle. All of that's fine. But then the moment you span multiple tenants, you add an app. And then it gets added as a service principle into the other tenants. Then it just gets confusing. And they're sort of the basic building blocks for everything else.
SPEAKER_00Like you talked about app templates, right? Which is another different concept. And then OIDC and SAML types of applications are another type as well. But they use the same underlying templates. building block of apps and service principles and yeah it's an area that like Entra was built for apps like the directory part We did a talk on the history of Entra.
SPEAKER_00And from day one, even before we had groups in Entra, we had apps. So that concept of apps and service principles were there. Because the reason Entra existed was to give access to applications. The authentication part, yes, but anyone could write auth. you know, for the applications. But having that central repository of apps was one of the reasons Entra like came into being as a service.
SPEAKER_02I have to watch that talk. That sounds really fascinating. And it's tricky. Like this is how it works, right? We build things over time. We iterate and things change. Yeah.
SPEAKER_00Yes. Yeah. And things are about to change a lot more as well. So just a teaser for like Ignite. I don't know when we'll publish this, if it'll be post-Ignite or not. Just a teaser is that if you thought apps and service principles are hard to understand, wait for Ignite. I'm excited then. This is tempting. I am curious how agent identities are going to develop because it seems like it's
SPEAKER_02more a concept than a type of object right now. I was looking at that a little bit recently.
SPEAKER_00Yeah, so yeah, it'll be on that area. So we, Microsoft announced agent ID at Build.
SPEAKER_02Sorry, I got really excited. The context as well as the agents, right? Now we have, before we had users, applications, and the resources that they own. And now we have users, applications, the clients they're using, like the agentic clients, and then the resources. And that's, I can imagine that's quite a lot to untangle. You get so many parties involved in that trusted relationship to accessing different resources, different information.
SPEAKER_00Exactly. And agents in your company, agents from other companies, just like apps, right? And where they come from, we published a blog post about the different evolution of agents. And we are working, Microsoft is working with the industry on updating the specs because the existing model of OAuth like falls over a little bit when you add agents to the mix. And especially as they evolve into becoming like digital workers or a colleague, digital colleague that,
SPEAKER_00you know, you can message and things like that. So those agents will have their own identity and, They might even have their own mailbox and things like that, right? So how do you, how do they represent themselves? And then they will use apps as well. So it's, you can see how it's becoming like a spider web of access and tokens between them.
SPEAKER_02Absolutely. And there's so many different exchanges of tokens, right, that we don't even see, types of tokens we don't even see. Yeah. I can only imagine trying to untangle that.
SPEAKER_00Yeah, it's an interesting time. There's a lot happening in the world and it's a lot for us to learn as well. So security and research, I don't think we'll ever go away. I don't think agents can replace that part of the story for a long time.
SPEAKER_02It is tricky. It definitely emphasizes that we talk about identity being a big trust barrier, trust boundary. But we don't necessarily split out the topic of applications from identity, right? Applications are their own kind of trust boundary. They create this new type of chaos, right? But to your point from day one, you know, that's that's what we need in order to provide that business connectivity. And that's what I really love about if you ever catch me at a cocktail hour, I won't shut up about it. This is what I love about researching Microsoft products is
that they exist to connect business.
SPEAKER_02They exist to connect users and they exist for enterprises specifically. And the volume of use cases that everybody needs while doing every type of work across the world is vastly more than just development or just web hosting. And I think that creates this really unique situation where absolutely, like, we need these features for certain things. But it's hard. It's really hard to set them all up and get them all working in the right way.
SPEAKER_00Exactly. And for me, like working at Microsoft, looking at Microsoft is like everyone says, like, you know, you should turn off everything, but then you'll end up with a product that's not usable. And then you'll need to configure, you need to spend ages configuring it to get it to be usable. So for Microsoft, it's as a product company. It's a fine line about building a service that is usable for end users and admins. And then also the security side of it of making sure how it is
secure by default.
SPEAKER_02It really is. It fascinates me quite a lot because I think in security as well it can be – like I remember when I joined the industry, it was quite common to have this joke that the most secure computer is, you know, in a piece of – a block of cement at the bottom of the ocean. Yes. And, you know, it's quite secure, but it doesn't necessarily work for the business and – Finding that sweet spot is really where the difficulty and the beauty is, as long as we can have that kind of relationship where,
SPEAKER_02you know, the business is going to do their best to try and secure things to the level that they can. And then if there's something they've missed, researchers or pen testers and entrepreneurs. Hopefully them before attackers, but sometimes a little both, right? Eventually, the risk will be illustrated through that technical aspect. I think especially screenshots, diagrams, being able to say this is the risk. And it may not feel real until that moment that you see it done. And then when you see it done, you're like, oh,
wow, yeah, why is that the case?
SPEAKER_02How did you get access to that? That shouldn't happen at all, no. Yeah. And as long as that dialogue still exists and that dialogue is still open, I think we can hopefully find the right spot together, right? The balancing point.
SPEAKER_00Yes. Yeah. It'll never be perfect, but sometimes you lean a little bit one way and then the other way.
SPEAKER_02Yeah. And then just be able to move that conversation.
SPEAKER_00Yes, yes. I lived through the pain of like Azure AD PowerShell was a first party app. It had pre-consented permissions. Amazing because anyone in a customer, like end user can just take PowerShell, use that old module and everything just works. So intra-PowerShell, graph PowerShell, they pivoted to being more secure, like there's no consent at all. And then it's really hard for anyone to use them because now they have to go to the admin just to even do like user.re, like a delegated permission.
SPEAKER_00They need an admin to consent to it. And the admin is like, some admins will just blindly approve. Some will be like, no, I'm not going to give any of you any access to it. So they can't even use it for... doing simple things like, you know, getting a list of users or groups or automating things that they need. So, yeah, I've seen both sides of going one way versus the other. The good news, I mean, the good part for researchers was the Azure AD PowerShell app,
everyone uses it because that app has pre-consented permissions into the tenant.
SPEAKER_00Yeah.
SPEAKER_02especially with the consent requests in larger environments, right? You've got PIM requests that might need approval. Now you've got consent requests that need approval. Now you need an ops team. How big do you want that team to be? It starts getting pretty complicated.
SPEAKER_00Exactly, yeah. And knowing about the permissions, what's possible, what's not. And it's a journey for everyone who's coming into the intraspace to learn about the whole consent model and what is low risk versus high risk. as well. And one of the things that recently on a thread people are asking is when you go to consent, it's not really clear what is an app permission versus a delegate permission and until after you consent, and then you can go and see the permissions. So you definitely don't want to consent to an app in your prod
tenant directly. You would want to first add it into a test tenant and review those permissions
SPEAKER_00before you even do that. So those are like practices that the mature teams would implement versus directly testing or adding apps into production directly.
SPEAKER_02That's a good point. Yeah, the best I've got is searching every single permission description string in the graph reference for Microsoft graph permissions to like map it back. But that's not a great part of business process. And it's probably better to put untrusted apps in a different environment anyway.
SPEAKER_00Yeah, that's true. Cool. Awesome. Thanks a lot, Katie. It's been fascinating having you on. And for people... You should follow Katie. Your posts are mostly on the Datadog blog.
SPEAKER_02Mostly, yeah, mostly on Datadog Security Labs right now. That's where a lot of my effort's been going recently. You'll find some other thoughts from more like mentorship and defensive technical stuff on my personal blog, which you can find through Twitter. I don't tweet much, but when I do, it's usually because I publish something or somebody deserves credit for what they did, so... Before CloudSec, I've done a couple talks. I did one at SOCON, Spectro Ops Con last year,
or earlier this year, actually, time flies.
SPEAKER_02But all my talks as well, I have on my website. If anyone's curious, you can go all the way back to me trying to talk about email security ages ago, too, which is... Interesting to see times change, but I've always loved trying to communicate things in a way that people can understand better. I get very frustrated when I can't learn something effectively. And so I always hope to leave an artifact that might help someone else when I'm done with the topic.
SPEAKER_00Nice, nice. Oh, yeah. So I see on your site, external content. I'll make sure I include all these in the show notes. Yeah.
SPEAKER_02Thank you. Yeah. And thank you as well for chatting with me a bit. You do so much to connect. It really is a galaxy of content in the Entra space specifically. And it's really helpful to me to see what's coming up and what other fantastic things are coming out, even in the security space. You somehow managed to catch it all. So thank you for that.
SPEAKER_00Yeah, I mean, it's a fun thing. Like for me, it's about learning. And I learn a lot from, I keep repeating this, I learn a lot from people like you outside of Microsoft. And, you know, the stuff that you share, you explain how things work under the hood from an outside perspective. So it's always very interesting read. And I learned something new. So that for me is what I'm always looking for. It makes me really happy to hear that because that's exactly
the goal of it beyond
SPEAKER_02helping my employer.
SPEAKER_00Cool. Awesome. Next time, Katie. We'll see you on the interwebs.
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...
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...
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...
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...
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...