All modules

Module 13 · Operator

Identity, SSO & Entra ID

A conceptual track for OAuth, OpenID Connect, and Microsoft Entra ID. This is separate from the on-premises Active Directory module: no Kerberos, no domain controllers, and no attack procedures. You learn the parties, the tokens' jobs, how a professional scopes a tenant, and what three common tools are for.

2 lessons
6 deep sections
~85 min guided
Progress…

Authorized testing only. Practice on systems you own, isolated labs, or targets with written permission. Unauthorized access is illegal.

Outcomes

  • Name the OAuth and OIDC parties and what each token is supposed to prove
  • Separate Entra ID (cloud tenant, apps, Conditional Access) from on-prem Active Directory
  • Scope an identity assessment to a named tenant, apps, and read boundaries
  • Describe ROADtools, AADInternals, and GraphRunner without treating them as attack scripts

Lessons

Lesson 1
45 min3 sections

OAuth and OpenID Connect, conceptually

OAuth delegates access. OIDC adds a login. Learn the roles, the grant types you will see in real apps, and the mistakes that become findings — without forging tokens.

Learning objectives

  • Distinguish authorization (OAuth) from authentication (OIDC)
  • Name the resource owner, client, authorization server, and resource server
  • Explain authorization code, client credentials, and why implicit grant is obsolete
  • State what an access token, an ID token, and a refresh token are for

Deep teach-through

Four parties, two jobs

OAuth 2.0 answers: may this application call that API on someone's behalf? It is an authorization framework, not a login protocol by itself. The resource owner is the person or tenant who controls the data. The client is the application asking for access. The authorization server decides and issues tokens. The resource server is the API that accepts a valid token and still has to enforce its own permissions.

OpenID Connect sits on OAuth and answers a different question: who is the user? The extra artifact is an ID token, meant for the client so it can establish a session. An access token is meant for the API. Mixing those jobs — treating an access token as proof of identity, or letting the API trust the client to say who the user is — is a design flaw you should be able to name in a report.

You do not need to mint, replay, or modify tokens to understand this. A professional reads the app's registration, the redirect URIs, the scopes requested, and whether the API checks the audience and the caller's rights. Token contents are inspected only for structure and claims, the same way the in-browser JWT lab decodes a sample without touching the signature.

Grants you should recognize

Authorization code, especially with PKCE, is the normal interactive grant for web and mobile apps. The user authenticates at the identity provider, the app receives a short-lived code at a registered redirect, and the app exchanges that code for tokens on a back channel. Your review questions are: is the redirect URI exact, is PKCE used for public clients, and are refresh tokens stored somewhere appropriate?

Client credentials are for a service calling an API as itself, not as a user. The secret or certificate is the client's identity. Findings here are usually about where that secret lives, how broadly the app's permissions were granted, and whether a human login would have been the honest model.

The implicit grant put tokens in the browser URL. Modern guidance retires it. If you still see it, the professional note is 'legacy grant, tokens exposed to the front end,' plus a recommendation to move to authorization code with PKCE. Device code and on-behalf-of appear in enterprise flows; know their names so a scope document can allow or forbid them. This lesson does not walk through obtaining a token.

What 'good' looks like in a review

A sound integration validates tokens on the resource server: signature using the provider's published keys, issuer, audience, and expiry. The API then authorizes the action. A login screen is not authorization. A scope string is a request, not a guarantee that the API enforced it.

Consent screens, admin consent, and which directory the app is registered in are scope questions. An app in one tenant calling another tenant's data is a different engagement. Write that boundary down before anyone opens a tool.

Common report themes, stated as weaknesses rather than procedures: overly broad scopes, redirect URIs that accept unexpected hosts, long-lived secrets in source control, refresh tokens in local storage, and APIs that accept a token meant for a different audience. Pair each one with the fix: least privilege, exact redirects, a secret manager, and server-side validation.

Key concepts

OAuth 2.0
A framework for delegated authorization. It does not, by itself, prove who the user is.
OpenID Connect
An identity layer on OAuth. The ID token tells the client who authenticated.
Access token
A credential the client presents to an API. The API must validate it and then authorize the action.
PKCE
A check that the app which started an authorization code login is the same app that redeems the code.
Audience
The API a token was issued for. A token for one API must not be accepted by another.

Common mistakes

  • Calling OAuth a login protocol and skipping OIDC
  • Assuming a logged-in user may call every API method
  • Storing client secrets in the mobile app or a public repository
  • Reviewing a production tenant because a lab tenant felt slower
  • Pasting live tokens into tickets, chat, or this academy's notes

Defender view

  • Conditional Access, admin consent workflow, and sign-in logs are the control plane.
  • Short-lived tokens and rotation beat a perfect diagram that nobody operates.
  • Alert on new app registrations and unexpected admin consent, not only on failed passwords.

Operator checklist

  • I can name the tenant, the app registrations, and the APIs in scope
  • I know whether this is read-only review or a change window
  • I will not request tokens, consent, or admin roles outside that list
  • Findings will name the control gap and the fix, not a token

Practice drills

  1. Draw the four OAuth parties for a fictional notes app and label which artifact each one sees
  2. Write one sentence on why an access token is not an ID token
  3. List three scope questions you would ask before an Entra review starts

Next: Then separate Entra ID from the on-prem Active Directory module.

Lesson 2
40 min3 sections

Entra ID is not on-prem Active Directory

Module 7 is domain controllers, Kerberos, and on-prem directory attack-path thinking. This lesson is the cloud directory: tenants, enterprise apps, and Microsoft Graph. The tools overlap in conversation and must not be mixed up in a scope.

Learning objectives

  • Contrast a forest and domain with a tenant
  • Describe app registrations, enterprise apps, and directory roles at a high level
  • Say what ROADtools, AADInternals, and GraphRunner are for
  • Write scope language that keeps a cloud identity review inside one tenant

Deep teach-through

Two directories operators confuse

On-premises Active Directory is the Module 7 world: domain controllers, organizational units, Group Policy, Kerberos, and computers joined to a domain. Microsoft Entra ID is the cloud identity service behind Microsoft 365 and Azure. A company often has both, synchronized in one direction, and they are still different systems with different logs, consoles, and rules of engagement.

A tenant is the cloud boundary. Users, groups, devices, and applications live in that tenant. Administrative power is a directory role or a narrower app permission, not 'Domain Admin' copied into the cloud. Conditional Access is policy on sign-in: who, from where, on what device, with what authentication strength. None of that is a GPO.

If a statement of work says 'Active Directory,' ask which one. Testing the on-prem forest does not authorize the tenant, and reviewing the tenant does not authorize domain controllers. Hybrid identity is a design topic (how accounts are synced and where passwords are mastered). It is not permission to cross the boundary.

Apps, permissions, and Graph

An app registration is the application's identity: its client id, its credentials, and the permissions it asks for. An enterprise application (service principal) is that app as installed in a specific tenant, where an admin may have consented. Delegated permissions act as a signed-in user. Application permissions act as the app itself and are the ones that surprise people when they are broader than the integration needs.

Microsoft Graph is the API surface for users, groups, mail, files, and directory objects. A professional review asks which Graph permissions are granted, whether admin consent was required, and whether the integration could have used a narrower permission. You are reading configuration and contracts, not collecting mailboxes.

Sign-in logs, audit logs, and the list of consent grants are the evidence. Screenshot or export only what the rules of engagement allow, store it with the engagement, and do not copy it into a personal notes app.

Three tools, described only

ROADtools is a framework for collecting Microsoft Entra directory data you are allowed to read and exploring it locally so relationships between users, groups, roles, and apps are easier to see. It belongs in an authorized assessment of a tenant you administer or are contracted to review. This academy lists it so you know the name and the job. It does not ship collection steps.

AADInternals is a PowerShell module aimed at inspecting Entra ID and related Microsoft cloud configuration. In professional hands it is a way to understand settings the client has authorized you to read, then write findings. It is not a substitute for the admin center, and it is not for tenants outside the written scope.

GraphRunner is a PowerShell toolkit for exploring what a Microsoft Graph identity can see during an authorized review. Use the name when a report needs to say which class of tool would inventory Graph permissions. Do not treat a blog's command list as permission. If the engagement is read-only, the tool's job stops at reading what was in scope.

Key concepts

Tenant
The Entra ID boundary that holds a cloud directory's users, groups, devices, and apps.
App registration
The definition of an application's identity, credentials, and requested permissions.
Service principal
That application as it exists inside one tenant, including consent that tenant has granted.
Delegated vs application permission
Delegated acts as a user. Application acts as the app and often needs admin consent.
Conditional Access
Entra policy that allows, limits, or blocks sign-in based on user, device, location, and risk signals.

Common mistakes

  • Using Module 7 techniques against a cloud tenant because both are 'AD'
  • Assuming directory sync means the tenant and the forest are the same scope
  • Granting yourself a role in a tenant you were only asked to read
  • Naming a tool in a report without saying what question it answered

Defender view

  • Admin consent workflow and access reviews shrink standing application permissions.
  • Separate emergency-access accounts from daily administration, and monitor both.
  • Cloud sign-in logs and on-prem domain controller logs answer different questions.

Operator checklist

  • The scope names tenant IDs, not just the company name
  • On-prem domains are listed as in or out, separately
  • I know which portal or export the client will accept as evidence
  • Tool use stays inside read or change rights that are written down

Practice drills

  1. Write a six-line scope that allows one Entra tenant and forbids the on-prem forest
  2. In your own words, contrast an app registration with a service principal
  3. Open the tool pages for ROADtools, AADInternals, and GraphRunner and write one sentence each on what they are for

Next: API authorization is the next gap: a valid token still does not mean every object is yours.