CloudBasix ← Back to sign-in

Microsoft Entra ID — setup manual

How to register this console in Microsoft Entra ID so your directory accounts can sign in with Microsoft. Everything below is done once, by a directory administrator. This page works offline.

Entra ID is not configured on this instance — only username/password sign-in is available. Complete steps 1–6, then set the three values in step 7.
How access works on this console. Entra authenticates; the console's own user list authorizes. Before a person can sign in with Microsoft, an administrator must create a console user (under Users) whose username equals the Microsoft account's UPN — e.g. a console user named sample@email.com. That user's console permissions then apply. An unmatched Microsoft account is refused with a clear message. The Entra App Roles in steps 3 and 6 control who may reach the console at all via Entra; they do not set the console permission level.
Contents
  1. What must reach what
  2. Register the application
  3. Redirect & logout URLs
  4. Create the App Roles
  5. Create a client secret
  6. Require assignment
  7. Assign people
  8. Configure this instance
  9. Verify
  10. Troubleshooting

0What must reach what

A frequent objection is “our instance sits in a private network with no inbound access”. That is fine. Entra ID never connects to this application. Sign-in is a browser redirect; the only server-to-server call is outbound from here to Microsoft.

  (1) browser  ---------------->  this console          user opens the sign-in page
  (2) console  --- 302 ------->   browser               "go to login.microsoftonline.com"
  (3) browser  ---------------->  Entra ID              password / MFA / Conditional Access
  (4) Entra    --- 302 -------->  browser  ---------->  this console  /signin-oidc
  (5) console  === HTTPS OUT ==>  Entra token endpoint  redeem the code        [outbound]
  (6) console  === HTTPS OUT ==>  Entra JWKS            validate the signature [outbound]
PathRequired?
Entra ID → this console (inbound from Microsoft)Never happens
Public internet → this consoleNot required
Your users’ browsers → this consoleRequired (already true, or nobody could use it)
This console → login.microsoftonline.com on 443Required (outbound only)

Egress allow-list: login.microsoftonline.com, login.microsoft.com, aadcdn.msftauth.net. Nothing else. Group provisioning (SCIM) and back-channel logout would need inbound access — this console deliberately uses neither.

1Register the application

Entra admin center → App registrationsNew registration.

Namee.g. CloudBasix Console (shown on the consent prompt)
Supported account typesSingle tenant — accounts in this organisational directory only
Redirect URIplatform Web, value in step 2
App registrations list
App registrations → All applications. New registration is top-left. Client IDs are redacted here.
Redirect URI platform dropdown
Redirect URI platform. Choose Web — not SPA and not Public client. Picking the wrong one produces AADSTS650057 at sign-in.
Completed registration form
The completed form: a name, Single tenant, and the Web redirect URI from step 2.

Afterwards copy the Application (client) ID and Directory (tenant) ID from the Overview page.

Overview page with the two GUIDs
Overview. The two GUIDs you need are here — copy them, do not retype. Redacted in this screenshot.
Copy them, do not retype them. Both are GUIDs: 8-4-4-4-12 hexadecimal characters. A single mistyped character produces error AADSTS700016, which reads as “application not found” and sends you looking for the wrong problem.

2Redirect & logout URLs

Entra matches these character for character — scheme, host, port, path, trailing slash. These are the exact values for this instance:

https://dynamind.ai/signin-oidc

Under Authentication, set the front-channel logout URL:

https://dynamind.ai/signout-callback-oidc
Authentication redirect URI
Authentication → Redirect URI configuration. The registered Web URI must match what the app sends, character for character.
Implicit grant unticked
Authentication → Settings. Both implicit-grant boxes stay unticked: Authorization Code + PKCE does not use them.

3Create the App Roles

App Roles let Entra gate who may sign in (with step 5’s “assignment required”) and label assignments meaningfully. Their values are plain strings, identical in every tenant.

Console difference: on this console the App Role does not set the permission level — permissions come from the matched console user (see the callout at the top). Create the roles anyway: assignment gating needs at least one, and the labels keep the directory readable.

Create them individually under App roles, or paste this into Manifest (replace the "appRoles": [] line) and save — one action instead of three forms:

"appRoles": [
  {
    "allowedMemberTypes": [ "User" ],
    "description": "Full control of the console.",
    "displayName": "Administrator",
    "id": "1f4d4d3a-2f7a-4a2e-9a5c-1c9a9d4e0001",
    "isEnabled": true,
    "value": "Administrator"
  },
  {
    "allowedMemberTypes": [ "User" ],
    "description": "Standard non-administrator user.",
    "displayName": "User",
    "id": "1f4d4d3a-2f7a-4a2e-9a5c-1c9a9d4e0002",
    "isEnabled": true,
    "value": "User"
  },
  {
    "allowedMemberTypes": [ "User" ],
    "description": "Read-only access.",
    "displayName": "Read only",
    "id": "1f4d4d3a-2f7a-4a2e-9a5c-1c9a9d4e0003",
    "isEnabled": true,
    "value": "ReadOnly"
  }
]
Copy the JSON above to the clipboard
App roles list
App roles after creation.
App role editor
Creating one role. Display name is cosmetic; Value is the contract.
Manifest appRoles
Manifest route. Paste the JSON above to create all three at once.

The id values are arbitrary but must be unique GUIDs within the application. Keep the ones above and every deployment stays consistent.

4Create a client secret

Certificates & secretsClient secretsNew client secret. Choose an expiry your rotation process can meet.

The secret Value is displayed once, at creation. Copy it immediately; it cannot be retrieved later. Copy the Value column, not the Secret ID column — they sit next to each other and are easily confused.
Certificates and secrets
Certificates & secrets. Once you leave this page the secret cannot be read again, only replaced.

Store it outside source control: an environment variable, a secrets manager, or a file with restricted permissions. Never commit it.

5Require assignment

Enterprise applications → your app → Properties:

Assignment required?Yes — only explicitly assigned accounts may sign in
Visible to users?Yes to publish a tile in the users’ My Apps portal
Assignment required property
Enterprise applications → Properties. Assignment required = Yes is what stops any directory account from signing in.

6Assign people

Enterprise applications → your app → Users and groupsAdd user/group: pick the account, then pick a role.

Users and groups assignments
Users and groups. One row per person. Note the Default Access row — see the warning below.
Free tier warning
Add assignment. On Entra Free the group option is unavailable — individual users only.
Role picker
Role picker. One role per assignment.
Assigning groups requires Entra ID P1 or P2. On the Free tier the portal allows individual users only. If you see “Groups are not available for assignment due to your Active Directory plan level”, that is licensing, not a misconfiguration.
Remove any “Default Access” row. Entra can add one automatically when a user consents; it keeps an unassigned account signing in past the assignment gate.

The My Apps tile

With Visible to users = Yes the console appears in each assigned user’s My Apps portal. Selecting the tile opens the console and signs them in silently, because the browser already holds an Entra session.

My Apps tile
My Apps. The console tile is published to assigned users only.

7Configure this instance

Provide three values in appsettings.json under AzureAd (the section ships empty), or as environment variables:

"AzureAd": {
  "Instance": "https://login.microsoftonline.com",
  "TenantId": "<Directory (tenant) ID>",
  "ClientId": "<Application (client) ID>",
  "ClientSecret": "<the secret Value from step 4>"
}
AzureAd__TenantId=<Directory (tenant) ID>
AzureAd__ClientId=<Application (client) ID>
AzureAd__ClientSecret=<the secret Value from step 4>
Copy the environment variable names

Recycle the console’s IIS application pool (or restart the site). The sign-in page’s Sign in with Microsoft button appears once both the tenant and client IDs are present.

Multiple instances or an extra proxy

8Verify

  1. Open the sign-in page and choose Sign in with Microsoft.
  2. Approve the consent prompt on first use. It requests openid profile email only — no mail, files, or directory access.
  3. You should land on the console as the console user named after your UPN, with that user’s permissions. Open /console/Account/Whoami to see the mapping: the console user, the sign-in source, and the Microsoft account’s UPN / oid / tid.
  4. Sign in with an assigned Microsoft account that has no console user of that username: the console must refuse it and name the exact username an administrator needs to create.
  5. Remove an account’s assignment in Entra (step 6): with “assignment required” on, Microsoft must refuse the sign-in before the console is ever reached.
  6. Sign out: the console session ends and the browser round-trips Microsoft’s sign-out page.

?Troubleshooting

SymptomCause and fix
AADSTS700016
application not found in the directory
The client ID is wrong — usually a transcription error. Verify it is 8-4-4-4-12 hex characters and matches the Overview page exactly.
AADSTS50011
redirect URI mismatch
The registered URI differs from the one sent. Compare against the exact value in step 2, including scheme, port and trailing slash.
AADSTS650057 / invalid resource Redirect URI registered under the wrong platform. It must be Web, not SPA or Public client.
“Correlation failed” / “state missing” Cookies blocked, or multiple instances without a shared Data Protection key ring. See step 7.
Signed in with Microsoft, but refused by the console Working as designed: no active console user is named after the account’s UPN. Create or activate a console user whose username equals the UPN shown in the refusal message (copy it exactly), then try again.
Token exchange times out Outbound 443 to login.microsoftonline.com is blocked. See section 0.

Username/password access

Local console sign-in remains available alongside Entra — the console stays reachable when Entra is unreachable or before it is configured. Local and Microsoft sign-ins land on the same console user and the same permissions.