From bc07be5304850eff57b2a520f1f544d2add46110 Mon Sep 17 00:00:00 2001 From: fabiohaifa <61516935+fabiohaifa@users.noreply.github.com> Date: Fri, 11 Feb 2022 18:00:35 -0300 Subject: [PATCH] chore: documentation adjustment --- quickstart/README.md | 2 +- quickstart/scripts/modules/Azure.psm1 | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/quickstart/README.md b/quickstart/README.md index 4e28449..11a0490 100644 --- a/quickstart/README.md +++ b/quickstart/README.md @@ -98,7 +98,7 @@ Execute all these steps below to setup your evironment before running the Hands- ```powershell az config set extension.use_dynamic_install=yes_without_prompt - + Connect-AzureAD ./quickstart/scripts/cloud-setup/Deploy-AzurePreReqs.ps1 -ConfigurationFile "quickstart/configs/cloud-setup/hol.json" ``` diff --git a/quickstart/scripts/modules/Azure.psm1 b/quickstart/scripts/modules/Azure.psm1 index f814914..d711bf4 100644 --- a/quickstart/scripts/modules/Azure.psm1 +++ b/quickstart/scripts/modules/Azure.psm1 @@ -155,7 +155,14 @@ function AssignApplicationAdministratorAZRole } # Add the SP to role - Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $ObjectId + try { + Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $ObjectId + LogInfo -Message "Service Principal add into Role Application administrator with success!" + } + catch { + LogInfo -Message "Service Principal already have Application administrator role." + } + } function AssignRoleIfNotExists