Spacelift
PrivacyT&Cs
  • 👋Hello, Spacelift!
  • 🚀Getting Started
  • 🌠Main concepts
    • Stack
      • Creating a stack
      • Stack settings
      • Organizing stacks
      • Stack locking
      • Drift detection
    • Configuration
      • Environment
      • Context
      • Runtime configuration
        • YAML reference
    • Run
      • Task
      • Proposed run (preview)
      • Tracked run (deployment)
      • Module test case
      • User-Provided Metadata
      • Run Promotion
      • Pull Request Comments
    • Policy
      • Login policy
      • Access policy
      • Approval policy
      • Initialization policy
      • Plan policy
      • Push policy
      • Task policy
      • Trigger policy
    • Resources
    • Worker pools
    • VCS Agent Pools
  • 🛰️Platforms
    • Terraform
      • Module registry
      • External modules
      • Provider
      • State management
      • Terragrunt
      • Version management
      • Handling .tfvars
      • CLI Configuration
      • Cost Estimation
      • Resource Sanitization
      • Storing Complex Variables
      • Debugging Guide
    • Pulumi
      • Getting started
        • C#
        • Go
        • JavaScript
        • Python
      • State management
      • Version management
    • CloudFormation
      • Getting Started
      • Reference
      • Integrating with SAM
      • Integrating with the serverless framework
    • Kubernetes
      • Getting Started
      • Authenticating
      • Custom Resources
      • Helm
      • Kustomize
  • ⚙️Integrations
    • Audit trail
    • Cloud Integrations
      • Amazon Web Services (AWS)
      • Microsoft Azure
      • Google Cloud Platform (GCP)
    • Source Control
      • GitHub
      • GitLab
      • Azure DevOps
      • Bitbucket Cloud
      • Bitbucket Datacenter/Server
    • Docker
    • GraphQL API
    • Single sign-on
      • GitLab OIDC Setup Guide
      • Okta OIDC Setup Guide
      • OneLogin OIDC Setup Guide
      • Azure AD OIDC Setup Guide
      • AWS IAM Identity SAML 2.0 Setup Guide
    • Slack
    • Webhooks
  • 📖Product
    • Privacy
    • Security
    • Support
      • Statement of Support
    • Disaster Continuity
    • Billing
      • Stripe
      • AWS Marketplace
    • Terms and conditions
    • Refund Policy
  • Cookie Policy
Powered by GitBook
On this page
  • Pre-requisites
  • Configure Account Settings
  • Setup OIDC
  • Azure Portal: Navigate to Azure Active Directory
  • Azure AD: Create an App Registration
  • Azure AD: App Registration Configuration
  • Azure AD: Add UPN Claim
  • Azure AD: Configure App Credentials
  • Azure AD OIDC Setup Completed

Was this helpful?

  1. Integrations
  2. Single sign-on

Azure AD OIDC Setup Guide

Example instructions for setting up Azure AD as a single sign-on source via OIDC.

PreviousOneLogin OIDC Setup GuideNextAWS IAM Identity SAML 2.0 Setup Guide

Last updated 2 years ago

Was this helpful?

If you'd like to set up the ability to sign in to your Spacelift account using an OIDC integration with Azure AD, you've come to the right place. This example will walk you through the steps to get this setup, and you'll have single sign-on running in no time!

Pre-requisites

  • Spacelift account, with access to admin permissions

  • Azure account, with an existing Azure Active Directory

    • You'll need permissions to create an App Registration within your Azure AD

Please note you'll need to be an admin on the Spacelift account to access the account settings to configure Single Sign-On.

Configure Account Settings

You'll need to visit the Spacelift account settings page to set up this integration, from the navigation side bar menu, select "Settings."

Setup OIDC

Next, you'll want to click the Set Up box underneath the "OIDC Settings" section. This will expand some configuration we will need to fill out in a few minutes, which we will be obtaining from Azure. For now, copy the authorized redirect URL as we will need to provide Azure this URL when configuring our Azure App Registration within your Azure AD.

Azure Portal: Navigate to Azure Active Directory

Within your Azure Account, navigate to your Azure Active Directory where you'd like to setup the OIDC integration for. In this guide, we are using a Default Directory for example purposes.

Azure AD: Create an App Registration

While you are within your Active Directory's settings, click on App registrations from the navigation, and then select New registration.

Azure AD: App Registration Configuration

Configure your supported account types as per your login requirements. In this example, we are allowing Accounts in this organizational directory access to Spacelift.

Remember the authorized redirect URL we copied earlier from Spacelift? We'll need that in this step. You'll want to paste that URL into the Redirect URI input as shown. Make sure you select Web for the type.

Click Register.

Azure AD: Add UPN Claim

Start by navigating to the Token configuration section of your application.

Click the Add optional claim button, choose the ID token type, and select the upn claim:

Click the Add button, making sure to enable the Turn on the Microsoft Graph profile permission checkbox on the popup that appears:

Azure AD: Configure App Credentials

Navigate to the Certificates & secrets section of your application.

Click the New client secret button.

Give your secret a Description.

Define an Expires duration.

In this example, we are using 6 months for Expires. This means you will need to generate a new client secret in 6 months for your OIDC integration.

Click Add.

Now that we have the Client secret setup for our application, we'll need to take the Value and copy this into our Spacelift OIDC settings within the Secret input.

  • Value within Azure AD = Spacelift's Secret input

Don't click Save in Spacelift just yet, we still need to get the Client ID and Provider URL for your application.

The best way we've found to obtain the Client ID and Provider URL is to perform the following steps:

Click on Overview within your Azure App.

On this page Application (client) ID. Copy this value to Spacelift as the Client ID

Next, Click Endpoints which should expand a page with the endpoints for your App.

Copy the portion of the OpenID Connect metadata document URL that is highlighted as shown in the screenshot, and paste the value into Spacelift as the Provider URL.

In summary, here are the values that should be copied over to Spacelift:

  • Application (client) ID within Azure AD => Client ID on Spacelift

  • Secret Value you generated => Secret input on Spacelift

  • OpenID Connect metadata document URL => Provider URL on Spacelift

Click Save.

Azure AD OIDC Setup Completed

That's it! Your OIDC integration with Azure AD should now be configured (as per this example). Feel free to make any changes to your liking within your Azure AD App Registration configuration for the app that you just created.

Give your application a name - Spacelift sounds like a good one

⚙️
👏
Navigate to your Azure Active Directory.
Click on App Registrations, then click New Registration.
Give your App Registration a name. Configure the redirect URI.
Navigate to Credentials & secrets.
Click New client secret.
Define client secret Description and Expires duration.
Copy the Value to your Spacelift OIDC settings as the "Secret".
Copy the OpenID Connect metadata document URL.