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.
Available on: Enterprise EditionCloud
Authenticate Kestra users with their Microsoft Entra ID credentials using OIDC.
Configure Microsoft OIDC
To authenticate with Microsoft, add the following to your Kestra Security and Secrets 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 Entra ID OIDC documentation.
Configure Microsoft Entra ID
Create an Enterprise Application
- Visit the Azure portal.
- Select Microsoft Entra ID.
- Navigate to App registrations.
- Click 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.
Allow the first login
At a user’s first login, Kestra creates their account only if one of their groups exists in Kestra, a tenant has a default role, or the user has a pending invitation. Otherwise, the login is refused. See First login.
A default role gives every new SSO user the same permissions in its tenant, across every namespace, so keep it minimal. This one gives read-only access to flows and executions:
kestra: security: default-role: name: sso_viewer description: "Read-only access for new SSO users" permissions: FLOW: ["VIEW", "LIST"] EXECUTION: ["VIEW", "LIST"]To give users more access, bind roles to the groups they belong to in Entra ID instead. See Group sync and Default role.
Was this page helpful?