question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The value of deployment parameter 'keyVaultPrincipalId' is null

See original GitHub issue

Describe the bug While running the minimal deployment with the following command;

$context = Get-AzContext
./deploy.ps1 -type minimum -version latest -resourceGroupName rg-iiot-prd -subscriptionId xxxx -tenantId xxxx -applicationName xxx-xxx -context $context

i get this output & error;

Created new resource group rg-iiot-prd in australiaeast.
Deployment will use 'master' branch in 'https://github.com/Azure/Industrial-IoT'.
Start time: 09:47

Registering client and services AAD applications in your tenant...
Importing module AzureAD
Using passed context (Account xxxx, Tenant 0000-0000xxxxx)
Client and services AAD applications registered...

Starting deployment...
09:48:04 - Error: Code=InvalidDeploymentParameterValue; Message=The value of deployment parameter 'keyVaultPrincipalId' is null. Please specify the value or use the parameter reference. See https://aka.ms/resource-manager-parameter-files for details.

Deployment failed.
Removing resource group rg-iiot-prd...
True
New-AzResourceGroupDeployment: C:\xxxxx\Industrial-IoT\deploy\scripts\deploy.ps1:925
Line |
 925 |  … eployment = New-AzResourceGroupDeployment -ResourceGroupName $resourc …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | 09:48:04 - Error: Code=InvalidDeploymentParameterValue; Message=The value of deployment parameter 'keyVaultPrincipalId' is null. Please specify the value or use the parameter reference. See
     | https://aka.ms/resource-manager-parameter-files for details.

I am not a Global Admin, but I am owner on the subscription. But it looks like it was able to create the AAD apps just fine?

To Reproduce Steps to reproduce the behavior: Run the command above

Expected behavior The deployment to work as explained in readme

Desktop (please complete the following information):

  • OS: Windows
  • Version 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nspykecommented, Sep 9, 2020

@nspyke could you please try deploying and/or registering directly from the Azure Cloud Shell?

deploy.ps1 works on the master branch, in Azure Cloud Shell, only using the parameter -type minimum.

@nspyke Are you able to create/modify app registrations manually in the AAD tenants that you are using?

Yes, I have the Cloud Application Administrator role.

I was having this issue while using Powershell 7, and I’m thinking that its possible that that may have something to do with it? Now that I’ve reverted back to Powershell 5, I’m not encountering the issue.

I will need to do some more investigation when I have a bit of time, as there are a number of variables in play here.

0reactions
luiscanterocommented, Oct 2, 2020

@vjrantal One important module used by aad-register.ps1 is AzureAD, you can check if it’s installed like this: Get-Module -ListAvailable -Name "AzureAD"

The script also includes two fallbacks for running it in the Azure Cloud Shell. I’ve noticed that if you start a cmd command prompt from VS2019, then start powershell and run the above command, the module might not be found. If you start a PS directly (blue window), the module does get found. So the module path may also affect the execution: $env:psmodulepath -split ";"

Here are other useful commands:

Get-Module -ListAvailable -Name "AzureAD"
Install-Module -Name "AzureAD"
Update-Module -Name "AzureAD"
Read more comments on GitHub >

github_iconTop Results From Across the Web

azure service fabric - ARM template deployment fails
I'm getting an error message 'The value of deployment parameter 'abc_xyz' is null. Please specify the value or use the parameter reference'.
Read more >
Step 2. Setting Up Application Registrations
Message: The value of deployment parameter keyVaultPrincipalId is null. You need run the following command to create the aad.json file before running the...
Read more >
Getting an error when trying to create an azure sql database
The value of deployment parameter 'digestRegion' is null. Please specify the value or use the parameter reference.
Read more >
Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >
Required parameter 'adminPassword' is missing (null)
The final action was to provide an admin password for my VMs. image. Figure1 – failed deployment using an Azure ARM template. When...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found