M365 Show Podcast

Nobody Explains Microsoft Graph Consent—Here’s What’s Missing


Listen Later

Ever tried setting up app-only permissions with Microsoft Graph and ended up knee-deep in consent dialogs, confused about what just happened? You’re not alone. Most tutorials gloss over what ‘consent’ really means for non-interactive services—and where things can quietly go off the rails.Today, we’re breaking down the end-to-end workflow: exactly what you must configure in Azure AD, how permissions actually work, and what happens behind the scenes when you grab that elusive access token. Ready to finally fill in the missing pieces?The Consent Gap: Where Most Tutorials Get Microsoft Graph WrongIf you've ever read a quick-start on Microsoft Graph, you've probably seen the moment where the author waves at ‘consent’ and then skips straight to the code. There’s always that implied idea: tick a few boxes in Azure AD, grant the permissions your app needs, and you’re good to go. But the reality is, what happens with consent—especially when there’s no user in the mix—gets glossed over in documentation and walkthroughs alike. It’s easy to assume app-only access is just a matter of flipping a switch, but this is one of those areas where the devil’s in the details, and that devil can sneak up on you in a real tenant.A lot of admins and developers treat setting up app-only access in Microsoft Graph like they’re checking off a grocery list. Pick the permissions, hit “register,” and call it done. But as soon as something changes—a policy update, a new compliance review, or even an audit request from IT—those simple checkboxes start causing headaches. Suddenly, you’re hit with unexpected consent prompts, puzzled users, and security teams asking why an unattended app has sweeping admin-level access. What’s supposed to be non-interactive service access quickly turns into a permission soup that nobody quite remembers approving.Let’s put this in a real-world Microsoft 365 context. Imagine you’ve got a background service—maybe an automation script collecting usage stats, or a tool syncing files from OneDrive to SharePoint. Everything seems to work. Then, one afternoon, a global admin flips a setting related to consent policies, maybe to comply with a security mandate. The next morning? Your automation fails, logs fill up with unhelpful errors, and people are left scratching their heads. The consent mechanics behind that app-only setup are suddenly impossible to ignore, but it’s too late for an easy fix.Microsoft’s own documentation is dense, but here’s the bit that’s easy to miss: app-only permissions aren’t bound to a single user’s access, and they don’t ride along with a person’s security context. This means one consent event—one click, maybe months ago—can assign permissions that persist until someone manually revokes or alters them. If the app was granted ‘Sites.ReadWrite.All’ for SharePoint, that doesn’t just mean it can poke around your own mailbox. It could touch or expose every SharePoint site in the tenant, all because the consent scope was too broad. Most of the time, the tutorials don’t even pause to unpack this, so the risk quietly snowballs in the background.That brings us to a pattern that shows up over and over again in the field. You’ve got delegated permissions—what users see when they log in to an app and consent to “read your profile” or “view your mail.” Then there’s app-only permissions, where a service account operates without a human at the keyboard. Research from tenant-breach post-mortems shows admins often confuse the two, granting overly broad app permissions thinking they’re just approving a narrow workflow. It’s the difference between letting someone peek into one room versus handing them a master key for the whole building. Most folks don’t realize that with application permissions, even one misstep in the Azure portal means that automation can reach far more data than expected, all while nobody’s watching.Let’s take SharePoint as a tangent here, because that’s where things get really interesting—and sometimes risky. If you’re building a migrations tool or an analytics app and use SharePoint’s ‘Sites.ReadWrite.All’ permission, you’re not just scoping to one document library, even if that’s your intent. Instead, you’ve just given your process access to every site, personal drive, and team file in the tenant. A single consent event—maybe rushed through to resolve a support ticket—opens the door to data exposure. And the kicker? Unless someone goes out of their way to review the app’s permissions periodically, there’s rarely a visible audit trail. At best you get an entry in the sign-in logs, but that doesn’t tell you what was accessed, or if the app ever moved out of bounds.On top of that, policies around who can grant consent in Azure AD are far from one-size-fits-all. Some tenants allow privileged users to grant permissions for certain apps. Others lock things down so tightly that only global admins can approve or review app access. This patchwork approach means you might have an automation script that’s been running quietly for months—then, a new consent policy blocks its next token request, bringing everything to a halt. Teams relying on that service suddenly find their automation broken, and the audit trail leads to an admin who doesn’t even remember granting access in the first place.So, what’s actually on the line? Consent is more than a technicality—it’s a security posture, a compliance process, and an accountability framework rolled into one. If you don’t know who approved which permissions, when, and for what purpose, you’re flying blind. Silent security gaps are built into the workflow, not because someone was careless, but because the mechanics behind app-only consent rarely get explained in detail.But once you truly understand the mechanics—who consents, how scopes work, and what happens when permissions change—you’re no longer just checking boxes. You’re closing security gaps before they turn into incident reports and making sure responsibility is clear, not buried in the fine print. Now, let’s actually tackle the registration process, because granting safe, non-interactive access is where most admins set themselves up for pain later on.Registering Apps the Right Way: Avoiding Accidental Over-PermissionLet’s talk about the moment almost every admin glosses over—the actual Azure AD app registration. You’re rolling through the portal, naming your app, clicking “register,” maybe slapping your company name at the end so it feels official. You’re focused on the finish line, not the details buried in all those permission toggles. But here’s where things quietly go sideways. Everything in that interface looks the same: application and delegated permissions jumbled together, all sorts of checkboxes with similar sounding labels. It’s not always obvious that one small change dictates who can access what—and for how long. All the while the impact of these choices gets buried until you go back later and realize your so-called non-interactive app has more access than anything else in your tenant.Picture this: you’re setting up an automation to process calendar invites for a project team. Nobody wants to sit around clicking consent popups, so you go with app-only permissions. In the portal, you’re looking for the fastest path—select “Calendars.Read” and move on. But then the UI nudges you with a list of “suggested” permissions, and it’s tempting to grab a few extras while you’re there. That’s how you end up with “Calendars.ReadWrite” instead of just “read.” The distinction is subtle in the interface but substantial in practice. Now your background task doesn’t just see events—it can create, edit, or delete across the board, for every mailbox the app can touch.This pattern shows up everywhere, especially with tools, frameworks, and integrations. Let’s say you’re wiring up Power Platform to sync user profiles for a dashboard. You might see “User.Read.All” and “Directory.Read.All” sitting next to each other. One is scoped just to basic profile information, the other sweeps through your whole Azure AD directory. Most busy admins just grab both and move on, not realizing “Directory.Read.All” is often flagged in audits as high risk. And in an app-only context, you’ve granted that access to a background service, not to an individual with a role. So, even if you trust your users, an app using application permissions can perform actions they never would be able to approve themselves.This would all be less risky if the admin experience in Azure AD made the difference between delegated and app-only permissions impossible to miss. But it’s not that simple. Application permissions live in their own tab, but if you’re not sure about what each permission does, it quickly becomes a buffet of options. You’re in a hurry, there’s a looming project deadline, and all you want is for the integration to work. So, you end up grabbing “Mail.ReadWrite” or even “Sites.ReadWrite.All”—the nuclear option of SharePoint permissions—because you don’t have time to chase down the exact permission mapping. That’s how tomorrow’s compliance headache gets baked into your environment without anyone noticing.The problem gets worse as you scale up. Software vendors who want the easiest customer onboarding usually ask for the highest-level permissions so their apps don’t break on edge cases. You see this all over ISV and SaaS documentation: “in order for our app to work, please grant Directory.ReadWrite.All.” Even when your use case only needs to see whether users are active, not edit accounts or change passwords. Most folks don’t want to open a support ticket or block a vendor rollout, so they agree. Later, those permissions sit unused—or worse, become a target for attackers who discover unused but over-permissioned service principals in your tenant.Microsoft’s guidance doesn’t make things easier, either. Even though the docs spell out why you should use least privilege, the specifics are often hidden several links deep, under headings you wou

Become a supporter of this podcast: https://www.spreaker.com/podcast/m365-show-podcast--6704921/support.
...more
View all episodesView all episodes
Download on the App Store

M365 Show PodcastBy Mirko