Azure AD Setup¶
This guide covers configuring Microsoft Entra ID (Azure AD) as a federated identity provider so your organization's users can sign in to N-Hub with their corporate Microsoft accounts.
Prerequisites¶
- Access to the Microsoft Entra Admin Center (Azure Portal)
- Your N-Hub environment URL:
dev-au-03.nnnco.io - Contact with your platform administrator to complete the server-side configuration
Step 1: Register an Application¶
- Go to Azure Portal > Microsoft Entra ID > App registrations
- Click New registration
- Configure:
- Name:
N-Hub IoT Platform - Supported account types: Single tenant (your organization only)
- Redirect URI:
- Type: Web
- URI:
https://auth.dev-au-03.nnnco.io/ui/login/login/externalidp/callback
- Name:
- Click Register
Step 2: Configure Token Claims¶
- In the app registration, go to Token configuration
- Click Add optional claim
- Select token type: ID
- Add these claims:
emailfamily_namegiven_namepreferred_username
- Click Add
Step 3: Create a Client Secret¶
- Go to Certificates & secrets > Client secrets
- Click New client secret
- Description:
N-Hub federation - Expiry: 24 months (recommended)
- Click Add
- Copy the secret value immediately — it won't be shown again
Step 4: Gather Credentials¶
From the app registration Overview page, note:
| Value | Location in Azure Portal |
|---|---|
| Tenant ID | Directory (tenant) ID |
| Client ID | Application (client) ID |
| Client Secret | The value copied in Step 3 |
Step 5: Send Credentials to Your Administrator¶
Provide the following to your platform administrator:
- Tenant ID
- Client ID
- Client Secret
These will be securely stored and used to configure the identity provider. Once configured, your users will see a Microsoft sign-in option on the login page.
Secret Rotation
Client secrets have an expiry date. When a secret approaches expiry, create a new one in Azure Portal and provide the updated value to your administrator. The old secret continues to work until it expires, so there is no downtime during rotation.
Verification¶
- Navigate to https://dev-au-03.nnnco.io
- Click Sign In
- You should see a Microsoft sign-in option
- Click it and authenticate with your corporate Microsoft account
- On first login, an account is automatically created and linked to your organization
Troubleshooting¶
The redirect URI does not match (AADSTS50011)
The redirect URI in Azure doesn't match what the platform expects. Verify it is exactly:
User info not populated (missing name, email)
Ensure the optional claims (email, family_name, given_name, preferred_username) are added to the ID token in Step 2.
Microsoft sign-in option not appearing
The server-side configuration may not be complete. Contact your platform administrator to verify the identity provider is enabled.