Introduction
AzureAD 36 on Altered Security is rated Hard, and it earns it. The chain here touches an Administrative Unit, group ownership, a Logic App, application owner rights, and a Key Vault, one right after another, and each step only unlocks because of a small, specific misconfiguration rather than one big obvious hole.
The lab doesn’t make you enumerate the whole tenant blind. It hands you three leads up front:
- A target user:
[email protected] - An app registration name:
ASjitsnh447 - A group name:
AS-AD-121126-pooledLab-klpvbm447
The goal is just to turn those three names into a flag sitting in a Key Vault secret. Here’s the whole chain mapped out before I walk through it step by step:
Everything below is that same chain, just with the actual commands and screenshots behind each arrow.
Finding the path to a password reset
I threw my starting account and that target user into BloodHound’s pathfinding to see what connected them.
One hop: an AZHasRole edge to Password Administrator, then an AZResetPassword edge straight onto the target user. Password Administrator is one of the Entra ID roles you can scope down to a specific Administrative Unit instead of handing it out tenant-wide, and that’s exactly what’s going on here. My account doesn’t have password reset rights over the whole directory, it has them over this one Administrative Unit, which happens to contain the target.
Resetting the password from the CLI was a one-liner:
az ad user update --id "[email protected]" --password "NewStrongPassword123!"If you’re going off the official Altered Security walkthrough instead of BloodHound, you get to the same place by opening the Administrative Unit in the Entra admin center, clicking into the target user, and using the built-in “Reset password” button. Same result either way, I just find the CLI quicker once I already know who the target is.
With the password reset, I logged in as qlpixe447 and kept enumerating from there.
The group my new account owns
Running a quick BloodHound search on the new account turned up an AZOwns edge onto a group.
That’s the group name the lab gave us up front, AS-AD-121126-pooledLab-klpvbm447. Owning a group in Entra ID is its own thing, separate from any directory role. It doesn’t make you a member and it doesn’t give you any permissions the group itself has, it just lets you manage the group: add members, remove members, change its settings. So being the owner here doesn’t automatically mean anything is unlocked yet.
The description gives it away
I pulled up the group’s properties page in the Entra admin center to see what it was actually for.
The description field says, in plain text, “Has permissions to read logic app workflow.” Someone assigned this group an Azure RBAC role on a Logic App and then left themselves a note about it. That’s the whole hint: being a member of this group gets you read access to a Logic App somewhere in the subscription.
Getting into the group
I own the group, but I’m not a member of it, and membership is what actually carries the RBAC role. So I added myself.
This is the part that trips people up if they don’t know it: adding yourself doesn’t take effect instantly on an existing session. Azure caches your group memberships in the access token you got when you signed in, so the portal (and anything else using that same session) won’t see the new membership until you get a fresh token. I signed out and back in, waited a bit, and the Logic App showed up where it hadn’t before.
A Logic App with hardcoded creds
Once the new group membership kicked in, a Logic App appeared in my resource list that wasn’t visible before.
Just the one, asbkcsja447. The RBAC role the group had on it was enough to open it up and look around.
Reading the workflow code
Instead of poking at the designer, I went straight to the code view, since that shows you the raw workflow JSON including anything hardcoded into it.
The trigger is a Request kind, method GET, which means this workflow runs whenever its callback URL gets hit. But the part that matters is the Response action right below it: the body field is a hardcoded string, [email protected]:OZKREXxsPdY%@ae. That’s a username and password, sitting in plain text inside the workflow definition.
Since this value is static, you don’t technically need to fire the trigger to see it, reading the definition is enough, which is what I did. The official write-up walks it a bit differently: it has you copy the trigger’s callback URL and hit it directly in a browser, and the same credentials come back in the HTTP response. Both paths land on the same creds, since the response body never changes, one just reads it from the definition and the other triggers the workflow and reads it from the output.
Either way, I now had a second set of credentials: [email protected] and the password OZKREXxsPdY%@ae.
Owning the app registration
Logging in as sgyqvw447 and checking BloodHound again showed exactly why that account mattered.
sgyqvw447 owns the app registration ASJITSNH447, the one the lab named for us at the start. App registration ownership is another one of those directory permissions that sits completely outside RBAC and directory roles: an owner can manage the app’s credentials and settings regardless of what roles they hold anywhere else. That includes adding new client secrets, which is exactly what I needed, because a client secret plus the app ID is enough to authenticate as the app’s own service principal.
Quick heads up from the official write-up that I didn’t personally run into: this app registration can apparently only hold two active secrets at once, and if it’s already got two, Entra will refuse to let you add a third until you delete one. My pooled lab instance happened to have room, but if yours complains, just delete an existing secret first.
With a fresh secret, client ID, and tenant ID in hand, I logged in as the service principal:
az login --service-principal --username "3826b6aa-b38e-4278-add4-8a673264229b" --password "3i78Q~uc~C8XMEHE2No3bPg7naSD-M.2pP~KAciT" --tenant "5a2343fe-1ab9-49fa-829c-358486dd5ea8"Reaching the Key Vault
First thing with a new identity is always to check what it can actually touch:
az resource list -o table
Name ResourceGroup Location Type Status
----------- -------------------------------- ---------- ------------------------- ---------
ASvwatrl447 AS-AD-121126-pooledLab-mvlanj447 westindia Microsoft.KeyVault/vaults SucceededOne resource, a Key Vault. The service principal has whatever RBAC role lets it read this, so I listed the secrets inside it:
az keyvault secret list --vault-name "ASvwatrl447"
[
{
"attributes": {
"created": "2026-11-12T10:20:31+00:00",
"enabled": true,
"expires": null,
"notBefore": null,
"recoverableDays": 90,
"recoveryLevel": "Recoverable+Purgeable",
"updated": "2026-11-12T10:20:31+00:00"
},
"contentType": null,
"id": "https://asvwatrl447.vault.azure.net/secrets/asbnstdg447",
"managed": null,
"name": "asbnstdg447",
"tags": null
}
]Listing secrets only gets you metadata, not the value, it’s a separate permission. This service principal had both, so I read the actual secret value:
az keyvault secret show --vault-name "ASvwatrl447" --name "asbnstdg447"
{
"attributes": {
"created": "2026-11-12T10:20:31+00:00",
"enabled": true,
"expires": null,
"notBefore": null,
"recoverableDays": 90,
"recoveryLevel": "Recoverable+Purgeable",
"updated": "2026-11-12T10:20:31+00:00"
},
"contentType": null,
"id": "https://asvwatrl447.vault.azure.net/secrets/asbnstdg447/8b9f87bb70934ddeb4eb6f1a1bae1fac",
"kid": null,
"managed": null,
"name": "asbnstdg447",
"tags": null,
"value": "ashysrlg447asigoqsb447"
}Flag
The secret value is the flag: ashysrlg447asigoqsb447.
Six hops to get there: a scoped password reset, a group I owned but wasn’t in, a Logic App that leaked creds in its own definition, an app registration I could add a secret to, and a Key Vault that trusted the resulting service principal.
Mitigation
- Keep Administrative Unit-scoped roles like Password Administrator tightly assigned, and review who’s in each AU regularly, it’s easy to forget these exist once they’re set up.
- Never hardcode credentials or secrets inside a Logic App’s trigger, actions, or response bodies. Anyone with read access to the workflow definition can see them, whether or not they ever fire the trigger. Pull secrets from Key Vault at runtime instead.
- Audit group ownership and application ownership on a schedule. Both grant real control over membership and credentials without needing any Azure AD role at all.
- Scope Key Vault access narrowly with RBAC or access policies, so a single compromised service principal can’t list and read every secret in the vault.