|
| 1 | +--- |
| 2 | +title: "Microsoft Entra" |
| 3 | +linkTitle: "Microsoft Entra" |
| 4 | +description: "Instructions on how to configure Microsoft Entra OIDC Authentication for use in {{% ctx %}} Gateway." |
| 5 | +weight: 1 |
| 6 | +--- |
| 7 | + |
| 8 | +# {{% param title %}} |
| 9 | + |
| 10 | +## Configure Microsoft Entra OIDC Provider |
| 11 | + |
| 12 | +{{% alert title="Note" %}} |
| 13 | +In order to configure a Microsoft Entra Provider a Microsoft Azure account with at least the `Application Developer` role is needed. A `Workforce` or `External Tenant` is also required. |
| 14 | +{{% /alert %}} |
| 15 | + |
| 16 | +1. Register {{% ctx %}} Gateway as an application to create a trust relationship between {{% ctx %}} Gateway and the Microsoft Identity Platform: |
| 17 | + 1. Login to Microsoft Azure and navigate to `Microsoft Entra ID` > `Manage` > `App registrations`. |
| 18 | + 1. Select `+ New registration`. |
| 19 | + 1. Enter a meaningful Name for the {{% ctx %}} Gateway application. |
| 20 | + 1. Select the appropriate Supported account type, e.g. `Accounts in this organizational directory only`. |
| 21 | + 1. Click `Register`. |
| 22 | +1. Add a Redirect URI to allow {{% ctx %}} Gateway to send log in and log out requests to the Entra endpoint: |
| 23 | + 1. Select the application registration created in Step 1. |
| 24 | + 1. Click `Redirect URIs`. |
| 25 | + 1. Click `+ Add a platform`. |
| 26 | + 1. Select Single-page application and set: |
| 27 | + * `Redirect URIs` to `<protocol>://<host>:<port>/<webapplicationname>/redirect`, e.g. `https://server.domain.com/gateway/redirect`. |
| 28 | + * `Front-channel logout URL` to `https://localhost:44321/signout-callback-oidc`. |
| 29 | + * `Implicit grant and hybrid flows` to `ID tokens`. |
| 30 | + 1. Click `Configure`. |
| 31 | +1. Configure permissions for {{% ctx %}} Gateway to access the user's data using Microsoft Graph: |
| 32 | + 1. Select the application registration created in Step 1. |
| 33 | + 1. Select `API permissions` from the menu on the left. |
| 34 | + {{% alert title="Note" %}}The Delegated permission `User.Read` was added automatically when the application was registered.{{% /alert %}} |
| 35 | + 1. Click `+ Add a permission` |
| 36 | + * Select `Microsoft Graph` |
| 37 | + * Select `Application permissions`. |
| 38 | + * Locate and expand `GroupMember` and select `GroupMember.Read.All` to allow the application to authenticate itself without user interaction or consent. |
| 39 | + * Click `Add permissions`. |
| 40 | + 1. Click `+ Add a permission` again. |
| 41 | + * Select `Microsoft Graph` |
| 42 | + * Select `Delegated permissions` |
| 43 | + * Locate and expand `Openid permissions`, and select: |
| 44 | + * `email` to allow access to view the users’ email address. |
| 45 | + * `offline_access` to maintain access to data already accessed. |
| 46 | + * `openid` to allow users to sign in. |
| 47 | + * `profile` to allow access to view the user’s basic profile. |
| 48 | + * Click `Add permissions`. |
| 49 | +1. Configure the application registration to return the Entra groups to {{% ctx %}} Gateway: |
| 50 | + 1. Select the application registration created in Step 1. |
| 51 | + 1. Select `Token configuration` from the menu on the left. |
| 52 | + 1. Click `+ Add groups claim`. |
| 53 | + 1. Select `Security groups`. |
| 54 | + 1. Locate and expand `ID`. |
| 55 | + * Select `sAMAccountName`. |
| 56 | + 1. Click `Add`. |
| 57 | +1. Create credentials for {{% ctx %}} Gateway to authenticate with Entra securely: |
| 58 | + 1. Select the application registration created in Step 1. |
| 59 | + 1. Select `Client credentials`. |
| 60 | + 1. Click `+ New client secret`. |
| 61 | + 1. Enter a `Description` for the client secret. |
| 62 | + 1. In the `Expires` dropdown, select an expiration for the secret or specify a custom lifetime. |
| 63 | + 1. Select `Add`. |
| 64 | + {{% alert title="Warning" color="warning" %}}Make a note of the client secret Value as this is never displayed again after you have left this page.{{% /alert %}} |
| 65 | + |
| 66 | +## Configure {{% ctx %}} Gateway to use Microsoft Entra Authentication |
| 67 | + |
| 68 | +{{% alert title="Note" %}} |
| 69 | +In order to configure {{% ctx %}} Gateway to use a Microsoft Entra OpenID Connect Provider, an application MUST be registered and configured as specified in {{< ahref path="Cortex.Faqs.ConfigureOidcAuthentication.MicrosoftEntra.Entra" title="Configure Microsoft Entra OIDC Provider" >}} |
| 70 | +{{% /alert %}} |
| 71 | + |
| 72 | +1. Log on to {{% ctx %}} Gateway using the local Administrator account or as a user with the `Admin` role. |
| 73 | +1. Select `Admin` > `Authentication`. |
| 74 | +1. Select the `OpenID Connect` tab. |
| 75 | +1. Click `+ New Provider` and enter the provider details: |
| 76 | + 1. `Identifier` - a unique free-format identifier for this provider. This cannot be edited once the form has been saved. |
| 77 | + 1. `Display Name` - free-format text to be displayed on the provider tab and login button. |
| 78 | + 1. `Authority` - the URL to access the provider authentication. For Microsoft Entra authentication this should be `https://login.microsoftonline.com`. |
| 79 | + 1. `Tenant Identifier` - the Tenant ID. This can be obtained from the Application registration details in Microsoft Entra by clicking on the registration to display its details. Copy the value for `Directory (tenant) ID`. |
| 80 | + 1. `Client Identifier` - the Client ID. This can be obtained from the Application registration details in Microsoft Entra by clicking on the registration to display its details. Copy the value for `Application (client) ID`. |
| 81 | + 1. `Client Secret` - the client secret that was revealed when creating the client credentials for the Application in Microsoft Entra. If you do not have access to the client secret, it will be necessary to create a new client secret in Microsoft Entra - for guidance see step 5 in [Configure Microsoft Entra OIDC][]. |
| 82 | +1. Click `Validate` to validate the information entered and enable the Save button. |
| 83 | + {{% alert title="Note" %}}Validate does not validate the accuracy of the information entered, it only validates that it is of the correct format.{{% /alert %}} |
| 84 | +1. Click `Save` to save the provider’s configuration. |
| 85 | + |
| 86 | + {{% alert title="Note" %}}It may be necessary to refresh the browser to ensure correct operation.{{% /alert %}} |
| 87 | + |
| 88 | +[Configure Microsoft Entra OIDC]: {{< url path="Cortex.Faqs.ConfigureOidcAuthentication.MicrosoftEntra.Entra" >}} |
0 commit comments