Authenticate with Microsoft Entra ID via OIDC
For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append.mdto anykestra.io/docs/*URL for plain Markdown.
Authenticate Kestra users with their Microsoft Entra ID credentials using OIDC.
Configure Microsoft OIDC
To authenticate with Microsoft, add the following to your Micronaut configuration:
micronaut: security: oauth2: enabled: true clients: microsoft: client-id: "{{ clientId }}" client-secret: "{{ clientSecret }}" openid: issuer: 'https://login.microsoftonline.com/common/v2.0/'To get your client-id and client-secret, refer to the Microsoft Documentation.
Using Microsoft Entra ID as an OIDC provider
Create an Enterprise Application
- Visit the Azure portal.
- Select Microsoft Entra ID.
- Navigate to App registrations.
- Click on New registration and provide the necessary details:
- Enter a name for your application.
- Set Supported account types (e.g., “Default Directory only - Single tenant”).
- Under Redirect URI, select Web and enter
https://{{ url }}/oauth/callback/microsoft. Usehttpsand your actual webserver URL.
Generate client secret
- Go to Certificates & secrets.
- Under Client secrets, click on New client secret.
- Copy the generated secret and use it in the
{{ clientSecret }}field in your Security and Secrets configuration.
Kestra configuration
- Copy the Application (client) ID from the Overview section and use it as your
{{ clientId }}. - In the Endpoints section, locate the OpenID Connect metadata document URL. Remove the
.well-known/openid-configurationsuffix, and use the remaining base URL as your{{ issuerUrl }}.
The final URL should look like https://login.microsoftonline.com/{{ directory }}/v2.0/.
Example configuration:
micronaut: security: oauth2: enabled: true clients: microsoft: client-id: "{{ clientId }}" client-secret: "{{ clientSecret }}" openid: issuer: '{{ issuerUrl }}'Replace all placeholders with the values obtained from Entra ID.
Was this page helpful?