If anyone from Microsoft security reads this, could you please do something about login.microsoftonline.com/XXX/v2.0/adminconsent?
The callback you're redirecting the user to at the end of that flow is forgeable if an attacker knows an azure tenant ID of a different customer, and putting a "Never use the tenant ID value of the tenant parameter to authenticate or authorize users" warning in the docs is only helpful as long as a way to authenticate users exists.
They'll see it, tell a manager, it'll get added as a ticket to an Azure Devops board under the initiative for this month under the epic for employee suggestions, which will be reviewed & prioritised by Copilot and sent to a different middle manager as a weekly summary email and then automatically closed when no human ever interacts with the ticket after three months.
I spent 6 months working as a contractor in MS’ Chicagoland data centers. Nothing worked — phones on the walls ran Windows and did not give dial tone. Security systems unable to function because of Windows updates. Personnel more concerned with their required LinkedIn updates than their jobs. Not one FTE liked their role — everyone had a foot out the door.
When they offered to make me FTE I declined and moved on. Because it was an obvious absolute shit-show.
Sorry for those that are currently employed by MS.
We had a vending machine that required an app that made you buy tokens to access the food in the vending machines. Said app was a masterpiece of dark patterns. Put money in, maybe, if you're lucky, get food out. Maybe.
That's me. But I don't understand your comment. Could you expand on it, either in a reply or preferably by email or via an MSRC case? You can reply with the vuln number so I can fast route it.
> The callback you're redirecting the user to at the end of that flow is forgeable
The redirect_uri is checked against the app registration. There's a general OAuth problem called "open registration redirects" that applies here, about which we've [blogged](https://www.microsoft.com/en-us/security/blog/2026/03/02/oau...) - but frankly, none of the industry solves this well.
In general, "I can create a link that goes to malware via X endpoint" isn't very interesting - you can also just create a direct link to the malware. Web browsers won't reliably show you the real destination of a link anyhow and even if they did, it's mostly just us hackers who understand URLs at all.
> as long as a way to authenticate users exists.
I'm lost. Entra supports [OpenID Connect](https://learn.microsoft.com/en-us/entra/identity-platform/v2...) for authentication. Most portals that surface admin consent authenticate the user with an OpenID Connect request either immediately before or after the admin consent request.
I am a service provider. I have an Azure app registered so that clients can connect my app to their Azure environment.
Client A connected their Azure env to my service. Now an attacker creates a different tenant at my service and goes through the integration flow. Then he sends a request to my callback that says "admin consent configured for client A's tenant" and wants to steal Client A's data. How do I protect against that? Should I validate that the user who started the flow belongs to the same Azure tenant id? In itself it's not enough, what if it's just a random user without actual permissions to go through admin consent? What if a client legitimately has multiple tenants in my service that need to connect to the same azure tenant?
> Should I validate that the user who started the flow belongs to the same Azure tenant id?
Yeah. Basically, I'd expect most services are responding to the admin consent callback by saying "Admin consent flow complete. Redirecting to previous page" (usually some setup flow page). Then that page does whatever it normally does (presumably OpenID Connect sign-in with a cache in cookies / localStorage / sessionStorage) to authenticate the user.
So in a typical flow, the user is already signed in, and your service just reads their identity out of storage after the admin consent flow. If your service receives an unsolicited admin consent callback (and so there is no "previous page" and no user is signed in), I'd expect it goes to your service home page which either tries to sign the user in or shows an unauthenticated experience.
That's to say - most services setup flows are multi-step anyway. First the customer provides some information, then they sign a contract, then they pay, then they admin consent, then they configure your service's primary configuration. If admin consent is launced from /setupwizard/step4, then after admin consent, you go on to /setupwizard/step5. The normal thing step5 does (presumably, checking that the user is signed in, and then show the primary configuration user interface) should be good enough, just the same as if somebody randomly hit step5 without hitting step4 previously.
I want to first say thanks for engaging with me on this issue so directly, much appreciated.
As I said earlier - validating that the customer controls an azure user doesn't necessarily mean that they have permissions to grant admin consent.
Further, I think you perhaps kind of implicitly assume that when I authenticate users I do that by their Azure identity. In practice that can be a whole spectrum - whether I have my own user management system, and whether I couple it to Entra or not is not something you can rely on. Customers expect their preferred IdP to work with your service.
Making this inherently secure is just not that hard here - you could easily make this a bit more PKCE like with an additional service->azure call before redirecting the user to the flow or by adding a symmetrical signature to the callback and a new API to verify the signature.
> I want to first say thanks for engaging with me on this issue so directly, much appreciated.
Of course :)
> As I said earlier - validating that the customer controls an azure user doesn't necessarily mean that they have permissions to grant admin consent.
I think what I'm trying to say is: you don't really care if they have permissions to grant admin consent - you care if admin consent was granted. In step4, you show the link to the admin consent flow, and if they are an admin, they click it, and if not, they click skip. In step5, you check if an admin consent is present. It might have come from the prior step, but it also might have come from something else - who cares.
> whether I couple it to Entra or not is not something you can rely on
I think, if we're talking about the Entra admin consent flow, some degree of Entra usage can be assumed. The admin consent flow requires an Entra identity.
> PKCE
PKCE would actually not be a solve here. I don't know why so many people think PKCE solves problems that it doesn't solve, but it's very a common thing. Using browser dev tools, I can just change the tenant parameter with the appropriate cookies/state in place, and PKCE would verify fine. Even with confidential client PKCE, it just becomes a confused deputy based on the cookies.
> a new API
If you want to verify whether admin consent is present, the existing [oauth2permissiongrant](https://learn.microsoft.com/en-us/graph/api/resources/oauth2...) API exposes that information. Though admittedly I think we've left that thing in beta for a decade.
Don't get me wrong, I see what you're saying. We could OpenID Connect-ify it and emit an id token that has some sort of claim xms_adminconsent=1, which could be verified by the app. Actually, that's what the v1 endpoint does if you use the deprecated prompt=admin_consent parameter (minus xms_adminconsent=1, whose lack caused its own set of headaches). Directionally though, we felt that separating the auth flows from the provisioning flows simplified them both, and building special auth-ified variations for every provisioning flow (not just admin consent, but also sign-up, and authorize customer support guy, and ...) was over coupling. It's just unnatural to overload the authentication stack with all those random responsibilities. Having bog-standard REST+JSON APIs (i.e. MS Graph) for provisioning flows (and maybe also a default guided user interface like /adminconsent) provides a clean separation.
Edit: I think, if I were to make a change, it'd be a very small change - renaming `tid` to `tid_hint`. It's already a common practice to pass `login_hint` as a user indicator between services - and nobody gets confused and thinks that user is signed in, just because you have their username in a form post parameter. Maybe the explicit signposting of "hint" does the trick, socially.
I'm sure one of the 60,000 employees who have been told they're welcome not to work there anymore, because the line must go up infinitely, will be chomping at the bit to do so.
Reaching an actual human at Microsoft isn't enough. You have to reach the correct humans which is a much harder task. For example, you might have an idea. What if azure devops had a field for date component only, not date time, just the date because it would help you in an internal project. Can you find out who to reach? Even if you work at Microsoft, I would bet you cannot. Even when you find a defect in an internal product you are using, getting to a human requires you to go through layers of nonsense. I distinctly remember my manager telling me to not even bother explaining myself to the first support chat and to simply ask them to escalate. I was impressed at how they managed to make security a part of your review though. I never thought getting buy-in to update Newtonsoft.Json would be as easy as it was but a CVE meant you had to update it to whatever made the security flags happy.
Once I could reach the actual engineering team to look at the internal tool to look at the bug I had to report though, they were very responsive. The tool for communicating was cumbersome and made me feel like a vendor / customer relationship even though you are supposed to be the same team but once they realized it was an actual defect and not some harebrained feature request, they fixed it relatively quickly.
Anyone that's had to deal with Microsoft will tell you this means nothing
If you can even get attention from someone, you'll be bounced between teams and people who barely know the products they are "supporting"
Don't get me started on the Azure and O365 management portals
The only worse support experience I've had was with Oracle where it could take days just to get the boilerplate "send us your logs" response on a Sev1 issue, despite the logs already being provided in the initial ticket
In both cases, this is while at F100 companies with millions of dollars of licensed software and premium support contracts
Managing a vendor relationship is the act of distributing license usage through your people, reviewing contracts, having somebody that knows when and where you have to send money so that the software keeps working, and making sure you are not doing something against the contract.
With Microsoft that takes several people working full time. Corporations tend to not want more of those relationships to manage.
What do you mean "even get attention from someone"? Enterprise contracts have support included. You can get an engineer on the phone within 24 hours. As long as you are competent enough to answer their questions, their support has been fairly good in my experience.
Yes, it's triage. They do the basic steps, get relevant info, and try to figure out the right team to send it to. This is how support everywhere works.
> Anyone that's had to deal with Microsoft will tell you this means nothing...
In relation to everything you said in your post, let's just say "trust me, I know".
But you missed the point I was making.
The GP said "Makes me wonder why enterprises still flock there".
And anyone who's had to deal with enterprise procurement knows if you've got a vendor on the list then its easier to deal with that one than push for multiple.
And then there's the whole budgeting thing. If management can see you're already buying every single employee in the org a Teams license, then getting extra budget for some Azure toys will probably be an easier sell then "yeah, I know we're paying Microsoft a lot of money, but can we have some AWS too". Since in their eyes Azure and Teams licenses is the same thing, "money for Microsoft".
Sadly the tech desk experience in enterprises tends to fall low down the list, if it is considered at all.
Sure, in theory, if you've got a good CTO to fight your corner then YMMV, but not everyone does.
wow i've been forced to use teams for over a decade.. i didn't even realise such useful features exist in other presentation tools. like there is a world with software that actually makes my life easier!?
Federal Cyber Experts Thought Microsoft’s Cloud Was “a Pile of Shit.” They Approved It Anyway.
https://www.propublica.org/article/microsoft-cloud-fedramp-cybersecurity-government
For us a big part is that they have data centers in our country. It makes for improved latency and also makes a lot of our customers sleep better (justifiably so or not).
Amazon doesn't and regardless nobody feels comfortable using Google, who knows when they'll discontinue a product we would rely on.
I do .NET full time, every shop I've worked at was on Azure. It makes the most sense for .NET developers, but I'd personally prefer to just rent dedicated servers at this point.
Their sales folks are very good with C level folks, from the meetings I've sat in on. They will give you substantial credits and hands on support to build for you, depending on vertical and predicted future spend, especially if you're already at another cloud provider they're trying to pull you from.
Really not surprising given the history of sloppy coding, elementary authentication mistakes, outsourced "support", and anecdotal reports of horrid internal culture over the past few years
>> The original RuntimeUrl path was no longer validated, and as a result, you could perform that attack again. I would include some pictures, but they would be the same pictures as above, so you can just imagine them.
Such kindness & grace shown by the author. He/she could have ripped azure furthermore so easily.
God. I would hate to be the engineer forced to have enough Azure experience to be able to find these bugs and understand Azure’s infrastructure on this level.
Should have been addressed in the Geneva conventions.
Let’s see how their platform design holds up in the coming years, and if it can hold up to LLMs doing more of this same type of discovery and whether MSFT can fix it.
> Reporting “theoretical” issues with validation as an Employee
Microsoft still has employees ? ;)
(Sorry. Low bar. But in all honesty I thought they outsourced the majority of ops. I was surprised to hear in recent news that they actually had that many employees left)
The callback you're redirecting the user to at the end of that flow is forgeable if an attacker knows an azure tenant ID of a different customer, and putting a "Never use the tenant ID value of the tenant parameter to authenticate or authorize users" warning in the docs is only helpful as long as a way to authenticate users exists.