File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Tenant Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
using namespace System.Net
2
2
3
- Function Invoke-EditTenant {
3
+ function Invoke-EditTenant {
4
4
<#
5
5
. FUNCTIONALITY
6
6
Entrypoint,AnyTenant
@@ -46,9 +46,9 @@ Function Invoke-EditTenant {
46
46
}
47
47
48
48
# Update tenant groups
49
- $CurrentMembers = Get-CIPPAzDataTableEntity @GroupMembersTable - Filter " customerId eq '$customerId '"
49
+ $CurrentGroupMemberships = Get-CIPPAzDataTableEntity @GroupMembersTable - Filter " customerId eq '$customerId '"
50
50
foreach ($Group in $tenantGroups ) {
51
- $GroupEntity = $CurrentMembers | Where-Object { $_.GroupId -eq $Group.groupId }
51
+ $GroupEntity = $CurrentGroupMemberships | Where-Object { $_.GroupId -eq $Group.groupId }
52
52
if (! $GroupEntity ) {
53
53
$GroupEntity = @ {
54
54
PartitionKey = ' Member'
@@ -61,8 +61,8 @@ Function Invoke-EditTenant {
61
61
}
62
62
63
63
# Remove any groups that are no longer selected
64
- foreach ($Group in $CurrentMembers ) {
65
- if ($tenantGroups -notcontains $Group.GroupId ) {
64
+ foreach ($Group in $CurrentGroupMemberships ) {
65
+ if ($tenantGroups.GroupId -notcontains $Group.GroupId ) {
66
66
Remove-AzDataTableEntity @GroupMembersTable - Entity $Group
67
67
}
68
68
}
You can’t perform that action at this time.
0 commit comments