File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Tenant Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,24 @@ function Invoke-EditTenant {
6767 Remove-AzDataTableEntity @GroupMembersTable - Entity $Group
6868 }
6969 }
70+ $DomainBasedEntries = Get-CIPPAzDataTableEntity @GroupMembersTable - Filter " customerId eq '$ ( $Tenant.defaultDomainName ) '"
71+ if ($DomainBasedEntries ) {
72+ foreach ($Entry in $DomainBasedEntries ) {
73+ try {
74+ # Add corrected GUID-based entry using the actual GUID
75+ $NewEntry = @ {
76+ PartitionKey = ' Member'
77+ RowKey = ' {0}-{1}' -f $Entry.GroupId , $Tenant.customerId
78+ GroupId = $Entry.GroupId
79+ customerId = $Tenant.customerId
80+ }
81+ Add-CIPPAzDataTableEntity @GroupMembersTable - Entity $NewEntry - Force
82+ Remove-AzDataTableEntity @GroupMembersTable - Entity $Entry
83+ } catch {
84+ Write-Host " Error migrating entry: $ ( $_.Exception.Message ) "
85+ }
86+ }
87+ }
7088
7189 $response = @ {
7290 state = ' success'
You can’t perform that action at this time.
0 commit comments