How-To: Serie Deploy Secure ASF with ARM – Step 04 – Lookup the service principles

This step 4 of 10 in the post-serie “How-To: How installing a secure Service Azure Fabric Cluster (ASF) with Azure Resource Management (ARM) Template”. In this step we are going to lookup some ObjectIds, which we need in one of the following steps.

Overview of the steps
01. Create and import the certificates
02. Register SF Application in AAD and create AppKey
03. Generate encrypted AppKey
04. [CURRENT] Lookup the service principles
05. Create the Key Vaults with ARM
06. Adjust the SF Application settings
07. Upload certificates to Key Vault
08. Register the Service Fabric System Applications
09. Install SF Cluster with ARM
10. Coming soon!
Step 04: Lookup the Service Principle of AAD Group & Azure Key Vault

Select Azure Subscription

  • Start Powershell and execute:Login-AzureRmAccount
  • Login with the same credentials, you use for (In mine case the popup keeps popup, I clicked it away). Result will look like this.
  • When you are not in the correct subscription, then you have to select the correct subscription. Run command: Get-AzureRmSubscription
    You will see an overview of all the subscriptions which are connected to your login.
  • Select the correct subscription with the command: Select-AzureRmSubscription -SubscriptionName ‘<name of subscription>’. Now you are switched to the correct Azure subscription. If you want to verify if you are in the correct subscription you can run command Get-AzureRmContext.

Key Vault Service Principle

  • Now we are looking for the objectId of the KeyVault’s Service Principle. Run command Get-AzureRMADServicePrincipal -SearchString 'Azure Key'.

    Remember/Write down the ObjectId.

AAD Group

  • I created a test group in AAD, called ‘TestSven’, but probably you have already an AAD group available, see also ‘Requirement 04’ in step 01.
  • Run command: Get-AzureRmADGroup -SearchString '<Name of the group>'.

    Remember/Write down the ObjectId.

Next step: Step 05 – Create the Key Vaults with ARM