Aembit’s Credential Provider for Microsoft Azure Entra Workload Identity Federation (WIF) enables you to automatically obtain credentials through Aembit as a third-party federated Identity Provider (IdP). This allows you to securely authenticate with Azure Entra to access your Azure Entra registered applications and managed identities. For example, to assign API permissions or app roles to you registered applications or managed identities.
You can configure the Azure Entra Credential Provider using the Aembit web UI or through the Aembit Terraform provider.
Prerequisites
Section titled “Prerequisites”To configure an Azure Entra Credential Provider, you must have and do the following:
-
Ability to access and manage your Aembit tenant.
-
Ability to access and manage either of the following:
-
You request only one resource per Azure Entra Credential Provider
See detailed example
Azure’s architecture requires that you request only one resource per Azure Entra Credential Provider.
For example, when you need to access both Microsoft Graph and Azure Management, you must configure the following:
-
Two distinct Credential Providers:
-
One requesting the
https://graph.microsoft.com/.default
scope -
Another requesting the
https://management.azure.com/.default
scope
-
-
Two distinct Server Workloads:
-
One for
graph.microsoft.com
-
Another for
management.azure.com
-
-
In your Access Policies, map each Credential Provider to its respective Server Workload.
-
-
Terraform only:
-
You have Terraform installed.
-
You have the Aembit Terraform Provider configured.
-
Configure a Credential Provider for Azure Entra
Section titled “Configure a Credential Provider for Azure Entra”This section explains how to configure an Azure Entra Credential Provider in the Aembit web UI that requests a single Azure Entra resource. These steps assume you already have a Microsoft Entra registered application (see Prerequisites).
You must configure the Aembit Credential Provider at the same time as the Azure Entra registered application credential.
Create a Credential Provider
Section titled “Create a Credential Provider”-
Log in to your Aembit tenant, and in the left sidebar menu, go to Credential Providers.
-
Click + New, which reveals the Credential Provider page.
-
Enter a Name and optional Description.
-
In the Credential Type dropdown, select Azure Entra Identity Federation, revealing new fields.
Before filling out these fields, you must add the credential for your Azure Entra registered application in the Azure Entra Portal first.
Keep the Aembit web UI open while you work on the next section.
Add a credential for your Azure Entra registered app
Section titled “Add a credential for your Azure Entra registered app”In the Azure Entra Portal, create a new credential for your registered application:
-
In your Azure Entra Portal, go to App registrations and select your registered application from the list.
-
Go to Manage —> Certificates & secrets and select the Federated Credentials tab.
-
Click Add credential, to reveal the Add a credential page and fill out the following sections (for quick reference, see the mappings section):
-
For Connect your account:
-
Federated credential scenario - Select Other issuer
-
Issuer - From the Aembit Credential Provider page, copy and paste the OIDC Issuer URL
-
Type - Select Explicit subject identifier
-
Value - Enter the desired value (this must match the JWT Token Subject value on the Aembit Credential Provider page)
-
-
For Credential details:
-
Name - Enter the desired name
-
Audience - Use the default value or optionally change it to the desired value (this must match the Audience value on the Aembit Credential Provider page)
Your Aembit Credential Provider UI and Entra registered application credential should look similar to the following example:
-
-
Click Add and your new credential shows up on the Federated credentials tab in Azure Entra.
-
While still on your registered application, go to the Overview section.
Keep the Azure Entra Portal open to use it in the next section.
Complete the Credential Provider in the Aembit web UI
Section titled “Complete the Credential Provider in the Aembit web UI”Go back to the Aembit web UI, and complete the Credential Provider page:
-
For JWT Token Scope, enter the scope of the resource you want to request.
For example, for Microsoft Graph, use
https://graph.microsoft.com/.default
. -
Use the info from your Azure Entra registered application’s Overview page to complete the remaining fields for the Aembit Credential Provider (for quick reference, see the mappings section):
-
Azure Tenant ID - copy and paste the Directory (tenant) ID.
-
Azure Client ID - copy and paste the Application (client) ID.
-
-
Click Save.
Your Azure Entra Credential Provider now displays in your list of Credential Providers in the Aembit web UI.
Verify the connection
Section titled “Verify the connection”To verify the connection between your Aembit Credential Provider and your Azure Entra registered application:
-
On the Credential Providers page, select the Credential Provider you just created.
-
Click Verify.
After a few moments you should see a green banner display a “Verified Successfully” message.
If you don’t receive a “Verified Successfully” message, go back through the values in your Credential Provider in the Aembit UI and the credential in your Azure Entra registered application to make sure they’re correct.
You’re now ready to use your Credential Provider for Azure Entra Workload Identity Federation with your Server Workloads in an Aembit Access Policy!
Configure Azure Entra using the Aembit Terraform provider
Section titled “Configure Azure Entra using the Aembit Terraform provider”To configure an Azure Entra Credential Provider using the Aembit Terraform Provider, follow the steps in this section.
-
Follow the steps to Add a credential for your Azure Entra registered app.
Leaving the Issuer blank and stopping before you add the new credential.
Keep this page open as you’ll need some values from it.
-
Create a new Terraform configuration file (such as
azure-wif.tf
) with the following structure:provider "aembit" {}resource "aembit_credential_provider" "azureEntra" {name = "<Desired Credential Provider Name>"is_active = trueazure_entra_workload_identity = {audience = "<Audience from Azure Federated Credentials creation page>"subject = "<Subject from Azure Federated Credentials creation page>"scope = "<Scope within Microsoft ecosystem for the Access Token>"azure_tenant = "<Azure Tenant ID from Azure Entra Application or Managed Identity>"client_id = "<Azure Client ID from Azure Entra Application or Managed Identity>"}}Example Terraform resource file for Microsoft Graph
provider "aembit" {}resource "aembit_credential_provider" "azureEntra" {name = "Azure Entra WIF"is_active = trueazure_entra_workload_identity = {audience = "api://AzureADTokenExchange"subject = "aembit:federation:test"scope = "https://graph.microsoft.com/.default"azure_tenant = "7f492ad1-25ec-4bfe-9c3a-84b517de8f2c"client_id = "3d845691-7abc-4def-a123-456789abcdef"}} -
Apply the Terraform configuration:
Terminal window terraform apply -
After the Terraform apply completes successfully, the Aembit Terraform provider generates an OIDC Issuer URL as the value for
oidc_issuer
.Run the following command to obtain the value for
oidc_issuer
:Terminal window terraform state show aembit_credential_provider.azureEntra -
Copy the URL from
oidc_issuer
and return to the Azure Portal’s Add a credential page. -
Paste the URL from
oidc_issuer
into the Issuer field. -
Click Add and your new credential shows up on the Federated credentials tab in Azure Entra.
You’re now ready to use your Credential Provider for Azure Entra Workload Identity Federation with your Server Workloads in an Aembit Access Policy!
Azure Entra and Credential Provider UI value mappings
Section titled “Azure Entra and Credential Provider UI value mappings”The following table shows how the different value in Azure Entra from your registered application map to the required values to the Aembit Credential Provider web UI and Terraform provider:
Aembit Credential Provider value | Azure Entra credential value | Azure UI location | Terraform value |
---|---|---|---|
OIDC Issuer URL | Account Issuer | Registered app credential | Auto-populated |
Audience | Credential Audience | Registered app credential | audience |
JWT Token Subject | Account Value | Registered app credential | subject |
Azure Tenant ID | Directory (tenant) ID | Your app’s Overview | azure_tenant |
Azure Client ID | Application (client) ID | Your app’s Overview | client_id |