Azure

The tutorial provides instructions on setting up an API/access key clients have the option to integrate EMCP into their Azure environment.

Prerequisites

A tenant is a Microsoft Entra ID entity that typically encompasses an organization. Tenants can have one or more subscriptions, which are agreements with Microsoft to use cloud services, including Azure. Every Azure resource is associated with a subscription.

Each subscription has an ID associated with it, as does the tenant to which a subscription belongs. As you perform different tasks, you may need the ID for a subscription or tenant. You can find these values in the Azure portal.

Step-by-Step guide

Find your Azure subscription

Follow these steps to retrieve the ID for a subscription in the Azure portal.

  1. Sign in to the Azure portal.

  2. Under the Azure services heading, select Subscriptions. If you don't see Subscriptions here, use the search box to find it.

  3. Find the subscription in the list, and note the Subscription ID shown in the second column. If no subscriptions appear, or you don't see the right one, you may need to switch directories to show the subscriptions from a different Microsoft Entra tenant.

  4. To easily copy the Subscription ID, select the subscription name to display more details. Select the Copy to clipboard icon shown next to the Subscription ID in the Essentials section. You can paste this value into a text document or other location.

Tip

You can also list your subscriptions and view their IDs programmatically by using Get-AzSubscription (Azure PowerShell) or az account list (Azure CLI).

Register Resource Providers

Follow these steps to register resource providers:

  1. Under the Azure services heading, select Subscriptions. If you don't see Subscriptions here, use the search box to find it.

  2. Select in the left Settings menu Resource Providers. You may want to search for the term simply.

  3. Register the following resources with the subscription: "Microsoft.Capacity", "Microsoft.Compute", "Microsoft.Network", "Microsoft.Storage"

Find your Microsoft Entra tenant

Follow these steps to retrieve the ID for a Microsoft Entra tenant in the Azure portal.

  1. Sign in to the Azure portal.

  2. Confirm that you are signed into the tenant for which you want to retrieve the ID. If not, switch directories so that you're working in the right tenant.

  3. Under the Azure services heading, select Microsoft Entra ID. If you don't see Microsoft Entra ID here, use the search box to find it.

  4. Find the Tenant ID in the Basic information section of the Overview screen.

  5. Copy the Tenant ID by selecting the Copy to clipboard icon shown next to it. You can paste this value into a text document or other location.

Tip

You can also find your tenant programmatically by using Azure Powershell or Azure CLI.

The Microsoft identity platform performs identity and access management (IAM) only for registered applications. Whether it's a client application like a web or mobile app, or it's a web API that backs a client app, registering it establishes a trust relationship between your application and the identity provider, the Microsoft identity platform.

Register an application

Registering your application establishes a trust relationship between your app and the Microsoft identity platform. The trust is unidirectional: your app trusts the Microsoft identity platform, and not the other way around. Once created, the application object cannot be moved between different tenants.

Follow these steps to create the app registration:

  1. Browse to Identity > Applications > App registrations and select New registration.

  2. Enter a display Name for your application. Users of your application might see the display name when they use the app, for example during sign-in. You can change the display name at any time and multiple app registrations can share the same name. The app registration's automatically generated Application (client) ID, not its display name, uniquely identifies your app within the identity platform.

  3. Specify who can use the application, sometimes called its sign-in audience.

    Expand table

    Supported account typesDescription

    Accounts in this organizational directory only

    Select this option if you're building an application for use only by users (or guests) in your tenant. Often called a line-of-business (LOB) application, this app is a single-tenant application in the Microsoft identity platform.

    Accounts in any organizational directory

    Select this option if you want users in any Microsoft Entra tenant to be able to use your application. This option is appropriate if, for example, you're building a software-as-a-service (SaaS) application that you intend to provide to multiple organizations. This type of app is known as a multitenant application in the Microsoft identity platform.

    Accounts in any organizational directory and personal Microsoft accounts

    Select this option to target the widest set of customers. By selecting this option, you're registering a multitenant application that can also support users who have personal Microsoft accounts. Personal Microsoft accounts include Skype, Xbox, Live, and Hotmail accounts.

    Personal Microsoft accounts

    Select this option if you're building an application only for users who have personal Microsoft accounts. Personal Microsoft accounts include Skype, Xbox, Live, and Hotmail accounts.

  4. Don't enter anything for Redirect URI (optional). You'll configure a redirect URI in the next section.

  5. Select Register to complete the initial app registration.

When registration finishes, the Microsoft Entra admin center displays the app registration's Overview pane. You see the Application (client) ID. Also called the client ID, this value uniquely identifies your application in the Microsoft identity platform.

Important

New app registrations are hidden to users by default. When you are ready for users to see the app on their My Apps page you can enable it. To enable the app, in the Microsoft Entra admin center navigate to Identity > Applications > Enterprise applications and select the app. Then on the Properties page toggle Visible to users? to Yes.

Your application's code, or more typically an authentication library used in your application, also uses the client ID. The ID is used as part of validating the security tokens it receives from the identity platform.

Add credentials

Credentials are used by confidential client applications that access a web API. Examples of confidential clients are web apps, other web APIs, or service-type and daemon-type applications. Credentials allow your application to authenticate as itself, requiring no interaction from a user at runtime.

Add a client secret

Sometimes called an application password, a client secret is a string value your app can use in place of a certificate to identity itself.

Client secrets are considered less secure than certificate credentials. Application developers sometimes use client secrets during local app development because of their ease of use. However, you should use certificate credentials for any of your applications that are running in production.

  1. In the Microsoft Entra admin center, in App registrations, select your application.

  2. Select Certificates & secrets > Client secrets > New client secret.

  3. Add a description for your client secret.

  4. Select an expiration for the secret or specify a custom lifetime.

    • Client secret lifetime is limited to two years (24 months) or less. You can't specify a custom lifetime longer than 24 months.

    • Microsoft recommends that you set an expiration value of less than 12 months.

  5. Select Add.

  6. Record the secret's value for use in your client application code. This secret value is never displayed again after you leave this page.

in the EMCP, go to vHSM -> Vault -> Cloud Keys to add the API key. Once you finish everything, fill in the details of all the IDs and secrets you saw above.

Manual Configuration of Permissions

Register resource providers ("Microsoft.Capacity", "Microsoft.Compute", "Microsoft.Network", "Microsoft.Storage") and add permissions:

"Microsoft.Compute/virtualMachines/write",
"Microsoft.Resources/subscriptions/resourceGroups/write",
"Microsoft.Network/networkInterfaces/write",
"Microsoft.Network/networkSecurityGroups/write",
"Microsoft.Network/networkSecurityGroups/securityRules/write",
"Microsoft.Network/publicIPAddresses/write",
"Microsoft.Network/virtualNetworks/write",
"Microsoft.Compute/virtualMachines/start/action",
"Microsoft.Compute/virtualMachines/powerOff/action",
"Microsoft.Network/virtualNetworks/subnets/write",
"Microsoft.Compute/virtualMachines/delete",
"Microsoft.Network/virtualNetworks/delete",
"Microsoft.Network/virtualNetworks/subnets/delete",
"Microsoft.Network/publicIPAddresses/delete",
"Microsoft.Network/networkSecurityGroups/delete",
"Microsoft.Network/networkSecurityGroups/securityRules/delete",
"Microsoft.Network/virtualNetworks/subnets/join/action",
"Microsoft.Network/publicIPAddresses/join/action",
"Microsoft.Network/networkInterfaces/join/action",
"Microsoft.Compute/disks/delete",
"Microsoft.Network/networkInterfaces/delete"

Please verify that the app/account has also sufficient quotas in the datacenter regions of choice.

Last updated