Skip to content

Commit b3841e8

Browse files
authored
Merge pull request KelvinTegelaar#1515 from Ren-Roros-Digital/AppDeploy
fix: fix template application deployment
2 parents 280654e + 9f36283 commit b3841e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAppDeploy.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ function Invoke-CIPPStandardAppDeploy {
6969

7070
foreach ($AppId in $AppIds) {
7171
if ($AppId -notin $AppExists.appId) {
72-
Write-Information "Adding $($AppId) to tenant $($Tenant)."
73-
$PostResults = New-GraphPostRequest 'https://graph.microsoft.com/beta/servicePrincipals' -type POST -tenantid $Item.tenant -body "{ `"appId`": `"$($Item.appId)`" }"
74-
Write-LogMessage -message "Added $($Item.AppId) to tenant $($Item.Tenant)" -tenant $Item.Tenant -API 'Add Multitenant App' -sev Info
72+
Write-Information "Adding $AppId to tenant $Tenant."
73+
$PostResults = New-GraphPostRequest 'https://graph.microsoft.com/beta/servicePrincipals' -type POST -tenantid $Tenant -body "{ `"appId`": `"$AppId`" }"
74+
Write-LogMessage -message "Added $AppId to tenant $Tenant" -tenant $Tenant -API 'Add Multitenant App' -sev Info
7575
}
7676
}
7777
foreach ($TemplateId in $TemplateIds) {
7878
try {
79-
Add-CIPPApplicationPermission -TemplateId $TemplateId -Tenantfilter $Tenant
80-
Add-CIPPDelegatedPermission -TemplateId $TemplateId -Tenantfilter $Tenant
79+
Add-CIPPApplicationPermission -TemplateId $TemplateId -TenantFilter $Tenant
80+
Add-CIPPDelegatedPermission -TemplateId $TemplateId -TenantFilter $Tenant
8181
Write-LogMessage -API 'Standards' -tenant $tenant -message "Added application(s) from template $($TemplateName) and updated it's permissions" -sev Info
8282
} catch {
8383
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message

0 commit comments

Comments
 (0)