Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Invoke-ExecBackendURLs {
#>
[CmdletBinding()]
param($Request, $TriggerMetadata)
$Subscription = ($env:WEBSITE_OWNER_NAME).split('+') | Select-Object -First 1
$Subscription = $env:WEBSITE_OWNER_NAME -split '\+' | Select-Object -First 1
$SWAName = $env:WEBSITE_SITE_NAME -replace 'cipp', 'CIPP-SWA-'

# Write to the Azure Functions log stream.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ function Invoke-ListGroupTemplates {
$Table = Get-CippTable -tablename 'templates'
$Filter = "PartitionKey eq 'GroupTemplate'"
$Templates = (Get-CIPPAzDataTableEntity @Table -Filter $Filter) | ForEach-Object {
$data = $_.JSON | ConvertFrom-Json

$data = $_.JSON | ConvertFrom-Json -ErrorAction SilentlyContinue
# Normalize groupType to camelCase for consistent frontend handling
# Handle both stored normalized values and legacy values
$normalizedGroupType = switch -Wildcard ($data.groupType.ToLower()) {
$normalizedGroupType = switch -Wildcard ($data.groupType) {
# Already normalized values (most common)
'dynamicdistribution' { 'dynamicDistribution'; break }
'azurerole' { 'azureRole'; break }
Expand Down