Skip to content

Commit 175b8ea

Browse files
Enhance Entra ID authentication guide with detailed app registration steps and configuration examples
1 parent b71f3d2 commit 175b8ea

1 file changed

Lines changed: 75 additions & 38 deletions

File tree

servicecontrol/security/entra-id-authentication.md

Lines changed: 75 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,102 +7,139 @@ component: ServiceControl
77

88
This guide explains how to configure Microsoft Entra ID (formerly Azure Active Directory) and ServiceControl to enable authentication for ServicePulse.
99

10+
## Prerequisites
11+
12+
- Administrator permissions on the Microsoft Entra ID tenant
13+
- ServiceControl 6.9.0 or later
14+
- ServicePulse 2.5.0 or later
15+
1016
## Configure Microsoft Entra ID
1117

1218
Register ServiceControl and ServicePulse as applications in Microsoft Entra ID to allow users to authenticate.
1319

1420
### Create the ServiceControl app registration
1521

22+
This app registration represents the ServiceControl API and defines the permissions that ServicePulse will request when users sign in.
23+
1624
1. Navigate to the [Azure Portal](https://portal.azure.com/).
1725
2. Open **Microsoft Entra ID** and select **Manage** > **App registrations**.
1826
3. Click **+ New registration**.
1927
4. Configure the registration:
2028
- **Name**: `ServiceControl API`
21-
- **Supported account types**: Accounts in this organizational directory only
29+
- **Supported account types**: Accounts in this organizational directory only (single tenant)
2230
- Click **Register**.
23-
5. On the **Overview** page, click **Endpoints** and copy the **OpenID Connect metadata document** URL (remove `/.well-known/openid-configuration` from the end). This is the authority URL used for `ServiceControl/Authentication.Authority`.
31+
32+
> [!NOTE]
33+
> Select **Accounts in any organizational directory** (multi-tenant) if users from multiple Entra ID tenants need access to ServicePulse.
34+
35+
5. On the **Overview** page, copy the **Directory (tenant) ID**. This is used to construct the authority URLs.
2436
6. Select **Manage** > **Expose an API**.
25-
7. Next to **Application ID URI**, click **Add** and save the default value.
26-
8. Under **Scopes defined by this API**, click **Add a scope** and configure:
37+
7. Next to **Application ID URI**, click **Add** and save the default value (e.g., `api://{application-id}`).
38+
8. Copy the **Application ID URI**. This is used for `ServiceControl/Authentication.Audience`.
39+
9. Under **Scopes defined by this API**, click **Add a scope** and configure:
2740
- **Scope name**: `api.access`
2841
- **Who can consent?**: Admins and users
2942
- **Admin consent display name**: `Full access to ServiceControl API`
3043
- **Admin consent description**: `Allows ServicePulse to call ServiceControl`
3144
- **State**: Enabled
3245
- Click **Add scope**.
33-
9. Copy the **Application ID URI**. This is used for `ServiceControl/Authentication.Audience` and as part of `ServiceControl/Authentication.ServicePulse.ApiScopes`.
3446

3547
### Create the ServicePulse app registration
3648

49+
This app registration represents ServicePulse as a client application that users will sign into.
50+
3751
1. In **App registrations**, click **+ New registration**.
3852
2. Configure the registration:
3953
- **Name**: `ServicePulse`
40-
- **Supported account types**: Accounts in this organizational directory only
54+
- **Supported account types**: Accounts in this organizational directory only (single tenant)
4155
- **Redirect URI**:
4256
- **Platform**: Single-page application (SPA)
43-
- **URI**: `http://localhost:5291/`
57+
- **URI**: The URL where ServicePulse is hosted (e.g., `https://servicepulse.example.com/`)
4458
- Click **Register**.
59+
60+
> [!WARNING]
61+
> Redirect URIs must use HTTPS in production environments. HTTP is only acceptable for local development (e.g., `http://localhost:9090/`).
62+
4563
3. Copy the **Application (client) ID**. This is used for `ServiceControl/Authentication.ServicePulse.ClientId`.
4664
4. Select **Manage** > **API permissions**.
4765
5. Click **+ Add a permission**.
4866
6. Select the **APIs my organization uses** tab.
49-
7. Search for and select **ServiceControl API**.
50-
8. Under **Delegated permissions**, enable **api.access**.
67+
7. Select **ServiceControl API**.
68+
8. Under **Delegated permissions**, check **api.access**.
5169
9. Click **Add permissions**.
5270

71+
> [!NOTE]
72+
> If ServicePulse is accessed from multiple URLs (e.g., localhost during development and a production URL), add each URL as a redirect URI in the ServicePulse app registration under **Manage** > **Authentication**.
73+
5374
## Configure ServiceControl
5475

55-
Add the Entra ID application details to the ServiceControl configuration to enable authentication.
76+
Add the Entra ID application details to the ServiceControl Error instance configuration to enable authentication. The same settings apply to Audit and Monitoring instances, using their respective prefixes.
77+
78+
### Collected values
79+
80+
During the Entra ID configuration, the following values should have been collected:
81+
82+
| Value | Source | Used for |
83+
|-------|--------|----------|
84+
| Directory (tenant) ID | ServiceControl API app registration > Overview | Authority URLs |
85+
| Application ID URI | ServiceControl API app registration > Expose an API | `Authentication.Audience` and `Authentication.ServicePulse.ApiScopes` |
86+
| Application (client) ID | ServicePulse app registration > Overview | `Authentication.ServicePulse.ClientId` |
5687

5788
### Using App.config
5889

5990
Add the following settings to the ServiceControl configuration file:
6091

6192
```xml
6293
<add key="ServiceControl/Authentication.Enabled" value="true" />
63-
6494
<add key="ServiceControl/Authentication.Authority" value="https://login.microsoftonline.com/{tenant-id}" />
65-
<add key="ServiceControl/Authentication.Audience" value="api://{app-id}" />
66-
95+
<add key="ServiceControl/Authentication.Audience" value="{application-id-uri}" />
6796
<add key="ServiceControl/Authentication.ServicePulse.ClientId" value="{client-id}" />
6897
<add key="ServiceControl/Authentication.ServicePulse.Authority" value="https://login.microsoftonline.com/{tenant-id}/v2.0" />
69-
<add key="ServiceControl/Authentication.ServicePulse.ApiScopes" value="[&quot;api://{app-id}/api.access&quot;]" />
98+
<add key="ServiceControl/Authentication.ServicePulse.ApiScopes" value="[&quot;{application-id-uri}/api.access&quot;]" />
7099
```
71100

72-
Replace the placeholder values with the values copied from the Entra ID app registrations:
101+
Replace the placeholder values:
73102

74-
| Placeholder | Value |
75-
|-------------|-------|
76-
| `{tenant-id}` | The directory (tenant) ID from the app registration overview |
77-
| `{app-id}` | The Application ID URI from the ServiceControl API registration |
78-
| `{client-id}` | The Application (client) ID from the ServicePulse registration |
103+
| Placeholder | Example value |
104+
|-------------|---------------|
105+
| `{tenant-id}` | `a1b2c3d4-e5f6-7890-abcd-ef1234567890` |
106+
| `{application-id-uri}` | `api://a1b2c3d4-e5f6-7890-abcd-ef1234567890` |
107+
| `{client-id}` | `f9e8d7c6-b5a4-3210-fedc-ba0987654321` |
79108

80109
### Using environment variables
81110

82-
Environment variables can be used instead of App.config, which is useful for containerized deployments and local development. Convert setting names by replacing `/` and `.` with `_`.
83-
84-
| App.config key | Environment variable |
85-
|----------------|---------------------|
86-
| `ServiceControl/Authentication.Enabled` | `SERVICECONTROL_AUTHENTICATION_ENABLED` |
87-
| `ServiceControl/Authentication.Authority` | `SERVICECONTROL_AUTHENTICATION_AUTHORITY` |
88-
| `ServiceControl/Authentication.Audience` | `SERVICECONTROL_AUTHENTICATION_AUDIENCE` |
89-
| `ServiceControl/Authentication.ServicePulse.ClientId` | `SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID` |
90-
| `ServiceControl/Authentication.ServicePulse.Authority` | `SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY` |
91-
| `ServiceControl/Authentication.ServicePulse.ApiScopes` | `SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES` |
92-
93-
Environment variables take precedence over App.config settings.
111+
Environment variables can be used instead of App.config, which is useful for containerized deployments. Environment variables take precedence over App.config settings.
94112

95113
```powershell
96-
# Enable authentication
97114
$env:SERVICECONTROL_AUTHENTICATION_ENABLED = "true"
98115
$env:SERVICECONTROL_AUTHENTICATION_AUTHORITY = "https://login.microsoftonline.com/{tenant-id}"
99-
$env:SERVICECONTROL_AUTHENTICATION_AUDIENCE = "api://{app-id}"
100-
101-
# ServicePulse settings
116+
$env:SERVICECONTROL_AUTHENTICATION_AUDIENCE = "{application-id-uri}"
102117
$env:SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID = "{client-id}"
103118
$env:SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY = "https://login.microsoftonline.com/{tenant-id}/v2.0"
104-
$env:SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES = '["api://{app-id}/api.access"]'
119+
$env:SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES = '["{application-id-uri}/api.access"]'
120+
```
121+
122+
### Audit and Monitoring instances
123+
124+
To enable authentication on Audit and Monitoring instances, configure the same settings using their respective prefixes. Only the base authentication settings are required; the ServicePulse settings are only needed on the Error instance.
125+
126+
**Audit instance:**
127+
128+
```xml
129+
<add key="ServiceControl.Audit/Authentication.Enabled" value="true" />
130+
<add key="ServiceControl.Audit/Authentication.Authority" value="https://login.microsoftonline.com/{tenant-id}" />
131+
<add key="ServiceControl.Audit/Authentication.Audience" value="{application-id-uri}" />
105132
```
106133

107-
Once configured, ServiceControl enforces authentication and ServicePulse requires users to sign in through Microsoft Entra ID.
134+
**Monitoring instance:**
135+
136+
```xml
137+
<add key="Monitoring/Authentication.Enabled" value="true" />
138+
<add key="Monitoring/Authentication.Authority" value="https://login.microsoftonline.com/{tenant-id}" />
139+
<add key="Monitoring/Authentication.Audience" value="{application-id-uri}" />
140+
```
141+
142+
## Verify the configuration
143+
144+
Once configured, restart the ServiceControl instances. When accessing ServicePulse, users will be redirected to Microsoft Entra ID to sign in.
108145

0 commit comments

Comments
 (0)