You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Deployment/Scripts/deploy.ps1
+31-18Lines changed: 31 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -255,16 +255,22 @@ function InstallModules ($modules) {
255
255
if ($spModule) {
256
256
throw('Please remove the older "SharePointPnPPowerShellOnline" module before the deployment can install the new cross-platform module "PnP.PowerShell"')
az ad app update --id $app.appId--required-resource-accesses './manifest.json'--password $global:appSecret
536
+
az ad app update --id $app.appId--required-resource-accesses './manifest.json'
537
+
538
+
$global:appId=$app.appId
531
539
532
540
Write-Host"Waiting for app to finish updating..."
533
541
@@ -541,7 +549,11 @@ function CreateAzureADApp {
541
549
Write-Host"Creating Azure AD App - '$appName'..."-ForegroundColor Yellow
542
550
543
551
# Create azure ad app registration using CLI
544
-
az ad app create --display-name $appName--required-resource-accesses './manifest.json'--password $global:appSecret--end-date '2299-12-31T11:59:59+00:00'
552
+
$app= az ad app create --display-name $appName--required-resource-accesses './manifest.json'
553
+
554
+
$appId=$app|ConvertFrom-Json|Select-Object appid
555
+
556
+
$global:appId=$appId.appid
545
557
546
558
Write-Host"Waiting for app to finish creating..."
547
559
@@ -551,8 +563,16 @@ function CreateAzureADApp {
551
563
552
564
}
553
565
554
-
$app= GetAzureADApp $appName
555
-
$global:appId=$app.appId
566
+
Write-Host"Creating secret for Azure AD App - '$appName'..."-ForegroundColor Yellow
567
+
568
+
# Create a secret - this will autogenerate a password
569
+
$secret= az ad app credential reset --id $global:appId
0 commit comments