Smallstep SSH

Azure AD Quickstart


You will need:

  • An account on the smallstep platform. Need one? Register here
  • A Premium edition account (P1 or P2)
  • Global administrator access to the account
  • The Azure CLI (run az login to log in)


The following provisioning features are supported:

  • Push Groups and New Users
  • Push Profile or Group Updates
  • Push User Deactivation
  • Reactivate Users

Step By Step Instructions

Step 1. Create Groups

You'll grant access to your Hosts via user groups. If you don't already have groups set up, you'll want to create a group for each kind of user access to your servers. For example, you might have a group for ssh users, and one for sudo users.

In the Azure portal, start at the Groups blade.

When creating your groups, give them names and accept the defaults on all other settings.

Step 2. Create an OAuth OIDC App

Create an App Registration

  1. Due to a quirk in the Azure AD web portal, we must create our OAuth OIDC app on the command line. Run the following:

    az ad app create --display-name "Smallstep SSH" --reply-urls --available-to-other-tenants true

    Note: You are creating a multi-tenant app here, but Smallstep will only work within the Azure tenant ID you'll give us a bit later.

  2. Now go back to your browser and go to App Registrations.

  3. Back in App Registrations, choose the All Applications tab at the top.

  4. Choose the Smallstep SSH app you just created on the command line.

  5. Note the Application (client) ID. You will need it in a moment.

Add a Client Secret

  1. Now choose Certificates & Secrets on the left.
  2. Under Client Secrets, make a + New client secret.
    • Name doesn't matter
    • Expires Never
  3. Save the secret
  4. Copy the value of the client secret you just created. You will need it in a moment.

Step 3. Enter your OIDC Details into the Smallstep SSH UI

  1. Log in at[TEAM-NAME]

  2. You should see the Welcome dialog. If the dialog does not open automatically, you can relaunch it from the “Resources” page.

  3. Paste your Application (client) ID and Client secret into the Smallstep onboarding dialog box. The tenant ID is your Azure Active Directory tenant ID and is located on the overview blade for Azure Active Directory.

    For the Configuration endpoint, use


  5. You've completed the OIDC portion of the setup.

Step 4. Create a SCIM application

Create an Enterprise Application
  1. Back in the Azure portal, go to the Enterprise Applications blade.

  2. Choose + New application.

  3. Add a Non-Gallery Application.

  4. Call it smallstep-usersync or some other name you'll remember.

Assign groups to your application

In your new application, under Users and Groups on the left:

  1. Go to + Add User to create a new assignment.
  2. Select your sudo and ssh groups.
  3. Choose Select on the bottom right.
  4. Choose Assign at the bottom left.

Your Users and Groups list should now look something like this:

Supply your SCIM credentials
  1. Back on your applications overview page, choose Provisioning on the left.
  2. Set the provisioning mode to Automatic.
  3. Under “Manage provisioning,” go to Update credentials.
  4. Expand Admin Credentials:
    • Supply the SCIM Tenant URL and Secret Token from your activation email.
    • Choose Test Connection and make sure that it works.
    • Save.
Set up attribute mappings

Smallstep needs to see the right attributes when you sync your directory with us.

  1. Expand Mappings.
  2. Choose Synchronize Azure Active Directory Users to customappsso
  3. Under the Attributes Mappings section, perform the following steps:
    1. Delete all attribute mappings except for userPrincipalName, displayName, mail, givenName, and surname
    2. Edit the userPrincipalName attribute.
      • Mapping Type: Expression
      • Expression: Item(Split([userPrincipalName], "@"), 1)
      • Target Attributes: userName
      • Match objects using this attribute: Yes
      • Matching precedence: 1
      • Ok

Your mappings should look like this when you're finished:

Turn on Provisioning
  1. Save your settings and return to the Provisioning panel.
  2. Change Provisioning Status to On.
  3. Choose Save

🤦‍♂️ There's a quirk in Microsoft's UI here, and you may see an error when saving after turning provisioning on. If so, wait 60 seconds and try Save again.

Step 5. Confirm the directory connection

Sign in at[Team ID]. You should see your directory with users and groups synced.

Don't see your users and groups? Microsoft's SCIM service may add a 40-minute delay after you set it up. You can force an update by checking ✅Clear current state and restart synchronization in the Provisioning panel, and choosing Save. Even then, it may take a minute to sync with Smallstep.

Troubleshooting Tips

  • Initial activation of Azure AD OIDC provisioning in Smallstep SSH requires entering your Application (client) ID, Client secret, and Configuration Endpoint into the Smallstep UI. Contact smallstep support with any questions |
  • Note: When users are deactivated in Azure AD, they will be deactivated in Smallstep. Users will not be able to SSH to servers, but their user accounts will remain on smallstep managed hosts. To permanently delete user data on smallstep managed hosts, contact Smallstep Support |