Skip to content

Commit fd465fb

Browse files
Fixes #4982
1 parent 1a65fa7 commit fd465fb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Groups/Invoke-ListGroupTemplates.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ function Invoke-ListGroupTemplates {
1313
$Table = Get-CippTable -tablename 'templates'
1414
$Filter = "PartitionKey eq 'GroupTemplate'"
1515
$Templates = (Get-CIPPAzDataTableEntity @Table -Filter $Filter) | ForEach-Object {
16-
$data = $_.JSON | ConvertFrom-Json
17-
16+
$data = $_.JSON | ConvertFrom-Json -ErrorAction SilentlyContinue
1817
# Normalize groupType to camelCase for consistent frontend handling
1918
# Handle both stored normalized values and legacy values
20-
$normalizedGroupType = switch -Wildcard ($data.groupType.ToLower()) {
19+
$normalizedGroupType = switch -Wildcard ($data.groupType) {
2120
# Already normalized values (most common)
2221
'dynamicdistribution' { 'dynamicDistribution'; break }
2322
'azurerole' { 'azureRole'; break }

0 commit comments

Comments
 (0)