Connect Microsoft Entra ID to Netos
Connect your company's Microsoft Entra ID (formerly Azure Active Directory) to Netos so your people sign in with their Microsoft work account. The zone gateway checks admission to each environment. NetBox group permissions determine which tables admitted users can view or change. This guide is for the Entra administrator and the Netos contact working together on the setup.
What You Need
On your side (Entra administrator)
- An Entra account that can create an app registration and grant consent for it in your tenant.
- Your tenant ID.
- The email domains your people sign in with, for example
example.com. - Every user's sign-in name (user principal name) is their work email in one of those domains.
- The Entra security groups to use for admission to each environment and the intended NetBox group memberships.
- The view, add, change and delete permissions each NetBox group needs on specific tables in each environment.
- MFA for your users through Conditional Access or security defaults if the environment requires it.
From Netos (we send you)
- Your zone name and its two redirect URIs.
- The credential Netos will use to authenticate to your tenant (see Step 3).
Back to Netos (you send us, Step 5)
- Tenant ID, application (client) ID, email domains, Entra security groups for gateway admission, and the intended NetBox group membership and table permissions per environment.
How Sign-In Works
sequenceDiagram
actor U as User
participant G as Netos zone
participant E as Your Entra tenant
participant N as NetBox
U->>G: Open Netos link, enter work email
G->>U: Continue with your company sign-in
U->>E: Microsoft sign-in and MFA if required
E->>G: ID token with groups
G->>G: Check browser admission for the environment
G->>N: Pass the admitted user's identity and groups
N->>N: Enforce NetBox group permissions on each table
Netos identifies each user by their tenant and object ID, not by their email, so a renamed user keeps their Netos
user. It reads the email from the preferred_username claim, so that claim must be the user's work email.
MCP requires a gateway group grant. Browser admission depends on the environment's settings. A browser route using Entra groups directly can admit users from an allowed provider when group filtering is off.
For configured OIDC clients, the Netos zone can also act as the issuer. For that integration, start with the
zone's discovery document at https://<zone>.app.netos.io/_auth/oidc/.well-known/openid-configuration.
It lists the signing keys endpoint and the JSON UserInfo endpoint, which requires an EdDSA-signed access token.
Step 1: Register the Application
In the Microsoft Entra admin center, create a new app registration.
- Name it, for example
Netos <zone>. - Supported account types: accounts in this organizational directory only (single tenant). Netos accepts a single-tenant issuer only.
- Add a Web redirect URI, then add the second one, so both are present:
https://<zone>.app.netos.io/_auth/callbackhttps://<zone>-auth.app.netos.io/_auth/callback
- Register, then note the Application (client) ID and the Directory (tenant) ID.
Step 2: Add the Groups Claim
Netos reads group membership from the groups claim in the ID token.
- In the app registration's token configuration, add a groups claim for security groups, included in the ID token.
- Entra sends group object IDs, not names. Send Netos the object ID of each group you name in Step 5.
- Keep the token to the groups Netos uses, for example by sending only groups assigned to the application. A user whose token carries more than 64 groups can be refused.
Step 3: Set the Credential
Netos supports two ways to authenticate to your tenant. Agree which with your Netos contact.
- Signed token (preferred): Netos signs a token with its own private key (
private_key_jwt). You add the public key Netos sends you to the app registration. There is no secret to store or rotate on your side. - Client secret: you create a client secret on the app registration and send it to Netos through the secure route your Netos contact gives you. Never send a secret by email or chat.
Step 4: Require MFA and Assign Users
- Netos treats a sign-in as multi-factor when the token reports it (
amrcontainsmfa). Production must explicitly set whether MFA is required. If the environment requires it, configure your Conditional Access policy for the Netos application to require MFA. - In the enterprise application for
Netos <zone>, assign the groups whose members may sign in to Netos. Setting assignment required stops anyone else from signing in.
Step 5: Send These Details to Netos
| Item | Example |
|---|---|
| Tenant ID | 11111111-1111-4111-8111-111111111111 |
| Application (client) ID | 22222222-2222-4222-8222-222222222222 |
| Email domains | example.com |
| Entra groups to admit per environment (object IDs and names) | Admit netos-engineers and netos-viewers to lab and production |
| NetBox group membership and table permissions per environment | Map to engineers and viewers. Grant the engineers group view and change on Devices in lab and view in production. Grant the viewers group view in both |
Netos adds your tenant to your zone, configures gateway admission and NetBox group membership for each environment,
and confirms when you can test the separately configured NetBox table permissions. Your issuer is https://login.microsoftonline.com/<tenant-id>/v2.0.
Worked Example
Both Entra groups in the table receive gateway admission to lab and production. An engineer can edit devices on
lab because their lab NetBox group has the Devices change permission. On production, their NetBox group has the
Devices view permission only. Moving the engineer to netos-viewers preserves gateway admission to both
environments and gives them the viewers group's NetBox permissions at their next sign-in.
Test Checklist
- A user in a linked group opens your Netos link, enters their email, and sees the button to continue with your company sign-in.
- They complete Microsoft sign-in and any required MFA. An account link opens the environments page. A direct pod link returns them to the requested page.
- In NetBox, check their group and verify the expected view or change access on the intended tables.
- Move them to a different Entra group and sign in again; their NetBox group changes.
- On an environment that requires a gateway group grant, a user without one gets Access denied.
Removing Access
Remove the user from the Netos groups in Entra, or disable the account. They cannot start a new session, and open sessions end at the next check against Entra.
Troubleshooting
| What the user sees | Likely cause | Fix |
|---|---|---|
| Email goes to Netos ID instead of Microsoft | The email domain is not linked to your tenant on this zone | Send Netos the domain |
| Microsoft reports a redirect URI mismatch | One of the two redirect URIs is missing or mistyped | Check both URIs in Step 1 |
| "Sign in failed" after Microsoft | Netos could not complete the token exchange, often a wrong credential (Step 3) | Check the credential, then send Netos the reference ID and time |
| "Access denied" after Microsoft | The user lacks a required gateway group grant, the groups claim is missing, or preferred_username is not an email in a linked domain |
Check the environment’s admission settings, Step 2 and the user's sign-in name |
| Refused on an environment that requires MFA | The sign-in did not report MFA | Require MFA for the Netos application (Step 4) |
Netos support can trace a failed sign-in from the reference ID shown on the error page.