M365 Federation
You set up m365 federation by linking your cloud domain to an identity provider. This setup redirects user logins to your central identity provider for sign-in checks. Teams often pair this trust with broad cloud admin roles for daily tasks. Overly broad roles give engineers standing rights to change tenant settings at any time. How m365 federation works in your cloud tenant Every new Microsoft cloud tenant starts with managed domains by default. The cloud directory stores password hashes and
Identity Federation: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up m365 federation by linking your cloud domain to an identity provider. This setup redirects user logins to your central identity provider for sign-in checks. Teams often pair this trust with broad cloud admin roles for daily tasks. Overly broad roles give engineers standing rights to change tenant settings at any time.
How m365 federation works in your cloud tenant
Every new Microsoft cloud tenant starts with managed domains by default. The cloud directory stores password hashes and checks them when a user signs in. When you switch a domain to federated status, that login flow changes right away.
You build a trust link between your cloud tenant and your identity provider. This link uses standard protocols like SAML or WS-Federation to pass signed login tokens. First, you verify ownership of your custom domain inside the cloud admin portal. Next, you exchange signing certificates and login URLs between the two identity systems. You also map a unique source attribute to match user accounts across both directories.
When a user types an email address, the cloud login page checks the domain. The system sees the federated status and sends the user to your identity provider. The identity provider checks the password and runs multi-factor rules for that person. After a valid check, the provider issues a signed token back to the browser. The cloud tenant reads the token, matches the user ID, and opens the session.
What native federation solves and what it leaves open
Domain federation gives your security team one place to manage user passwords and sign-ins. When someone leaves the company, you disable one account in your main identity provider. You can also enforce device checks and location rules before anyone gets a token. Users get a smooth single sign-on flow across their mail and cloud apps.
Still, federation only checks who logs in at the start of a session. It does not inspect or limit what admins do after they sign in. Cloud admins and support engineers still receive broad roles to fix tenant problems. Once an admin logs in, their session holds full power over user data. Federation cannot pause a risky PowerShell command or block a bulk mailbox export.
Identity Federation: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To close this gap, teams must separate sign-in checks from live command controls. You need a way to review admin actions before they run against production systems. You also need field-level masking that rewrites emails and phone numbers in query results.
Best practices for managing federated domains
Always keep two cloud-only emergency admin accounts on your default managed domain. If your identity provider goes down, federated users cannot sign in to fix it. Emergency accounts let you log in and repair broken trust settings right away. Store the keys for these emergency accounts in a safe offline location.
Track the expiration dates of your token signing certificates on a shared team calendar. If a signing certificate expires without an update, all federated logins will fail. Test certificate updates on a small test domain before touching your primary domain. Review your directory sync logs each week to catch mismatched user attributes early.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
What happens to active sessions when we turn on m365 federation?
Existing user sessions often stay active until their current access tokens expire. New login attempts redirect to your external identity provider as soon as you switch.
Can we federate a subdomain while keeping the root domain managed?
Yes, you can set up trust rules for each verified domain on its own. Add the root domain first if you want child domains to inherit settings.
How do we recover access if our identity provider goes offline?
Sign in with a cloud-only admin account that uses the default tenant domain. From there, you can switch the custom domain back to managed login status.
Related guides
In this post