Payroll Day
On the 26th of every month an export sends new starters, leavers and pay changes from Contoso to the payroll provider. This month it failed overnight. If the provider doesn't have the file by noon, 412 people get paid late.
Three locks to open
- 1Find the cause. Work out why the export can't sign in, and prove it.
- 2Fix it. Get the export working with the access it had before, and nothing more. The expired secret may not be the only thing Ravi left behind.
- 3Prove it. Run the export.
This room has a case file: the first lock only opens when you pin the evidence that proves the cause.
The payroll export failed overnight. The provider's cut-off is 12 o'clock. If we miss it, nobody gets paid tomorrow.
Ravi was looking at it yesterday afternoon. He thought it was 'probably a permissions thing' and started changing some. Not sure where he got to.
You escaped Payroll Day
Damage report
What happened
The payroll export signs in to Microsoft Entra ID as the Payroll-Export app, using a client secret with a 12-month expiry. The expiry reminder went to a shared mailbox that was deleted in the summer, so nobody saw it coming. The secret expired at midnight and the overnight export failed with AADSTS7000222. The day before, Ravi had guessed it was a permissions problem: he removed and re-added User.Read.All on the live app, which quietly dropped its admin consent. So once the secret was replaced, the export signed in but Graph refused it with 403 until consent was granted again.
How you'd fix it for real
- Find the failing service principal sign-in and read the error code before changing anything.
- Match the application ID to the right app registration; similar names are easy to mix up.
- Add a new client secret no longer than your policy allows, and copy the value immediately.
- Update the secret in the payroll system and run the export. If it signs in but gets 403, check the app's API permissions for missing admin consent.
- Grant consent only for the permissions the app already had. Don't add more to fix an error.
Where to find this in the real portal
- Find the failing app sign-in
Entra admin center > Entra ID > Monitoring & health > Sign-in logs > Service principal sign-ins - Open the right app
Entra admin center > Entra ID > App registrations > All applications, then search by Application (client) ID - Add a new secret
App registration > Certificates & secrets > Client secrets > New client secret
Stop it happening again
- Send secret expiry alerts to a team, and check where they go when mailboxes are removed.
- Track expiry dates for every app secret and certificate, and renew a month early.
- Use certificates instead of client secrets where the app supports them.
Learn it properly
Free interactive lessons on the skills this room tests, with exam-style checks.
- Plan and implement app registrationsPlan, register and secure apps in Microsoft Entra ID: account types, credentials, redirect URIs, API permissions and app roles.
- Identities for applications and Azure workloadsChoosing between managed identities, service principals, user accounts and managed service accounts, then creating, assigning and using managed identities to reach other Azure resources.