File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Modules/CIPPCore/Public/Entrypoints Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ function Push-UpdatePermissionsQueue {
2727 Add-CIPPDelegatedPermission - RequiredResourceAccess ' CIPPDefaults' - ApplicationId $ENV: ApplicationID - tenantfilter $Item.customerId
2828 Write-LogMessage - tenant $Item.defaultDomainName - tenantId $Item.customerId - message " Updated permissions for $ ( $Item.displayName ) " - Sev ' Info' - API ' UpdatePermissionsQueue'
2929
30- Write-Information ' Pushing CIPP-SAM admin roles'
31- Set-CIPPSAMAdminRoles - TenantFilter $Item.customerId
30+ if ($Item.defaultDomainName -ne ' PartnerTenant' ) {
31+ Write-Information ' Pushing CIPP-SAM admin roles'
32+ Set-CIPPSAMAdminRoles - TenantFilter $Item.customerId
33+ }
3234
3335 $Table = Get-CIPPTable - TableName cpvtenants
3436 $unixtime = [int64 ](([datetime ]::UtcNow) - (Get-Date ' 1/1/1970' )).TotalSeconds
Original file line number Diff line number Diff line change @@ -8,7 +8,24 @@ function Start-UpdatePermissionsOrchestrator {
88
99 try {
1010 Write-Information ' Updating Permissions'
11- $Tenants = Get-Tenants - IncludeAll | Where-Object { $_.customerId -ne $env: TenantID -and $_.Excluded -eq $false }
11+
12+ $PartnerTenant = @ {
13+ ' customerId' = $env: TenantID
14+ ' defaultDomainName' = ' PartnerTenant'
15+ ' displayName' = ' *Partner Tenant'
16+ }
17+
18+ $TenantList = Get-Tenants - IncludeAll | Where-Object { $_.Excluded -eq $false }
19+
20+ $Tenants = [System.Collections.Generic.List [object ]]::new()
21+ foreach ($Tenant in $TenantList ) {
22+ $Tenants.Add ($Tenant )
23+ }
24+
25+ if ($Tenants.customerId -notcontains $env: TenantID ) {
26+ $Tenants.Add ($PartnerTenant )
27+ }
28+
1229 $CPVTable = Get-CIPPTable - TableName cpvtenants
1330 $CPVRows = Get-CIPPAzDataTableEntity @CPVTable
1431 $LastCPV = ($CPVRows | Sort-Object - Property Timestamp - Descending | Select-Object - First 1 ).Timestamp.DateTime
You can’t perform that action at this time.
0 commit comments