File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Modules/CIPPCore/Public/Authentication Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ function Get-CippApiAuth {
2020 }
2121
2222 # Get auth settings
23- $AuthSettings = Invoke-AzRestMethod - Uri " https://management.azure.com/subscriptions/$SubscriptionId /resourceGroups/$RGName /providers/Microsoft.Web/sites/$ ( $FunctionAppName ) /config/authsettingsV2/list?api-version=2020-06-01" - ErrorAction Stop | Select-Object - ExpandProperty Content | ConvertFrom-Json
23+ $AuthSettings = ( Invoke-AzRestMethod - Uri " https://management.azure.com/subscriptions/$SubscriptionId /resourceGroups/$RGName /providers/Microsoft.Web/sites/$ ( $FunctionAppName ) /config/authsettingsV2/list?api-version=2020-06-01" - ErrorAction Stop | Select-Object - ExpandProperty Content | ConvertFrom-Json ).properties
2424 }
2525
26- if ($AuthSettings.properties ) {
26+ if ($AuthSettings ) {
2727 [PSCustomObject ]@ {
2828 ApiUrl = " https://$ ( $env: WEBSITE_HOSTNAME ) "
29- TenantID = $AuthSettings.properties. identityProviders.azureActiveDirectory.registration.openIdIssuer -replace ' https://sts.windows.net/' , ' ' -replace ' /v2.0' , ' '
30- ClientIDs = $AuthSettings.properties. identityProviders.azureActiveDirectory.validation.defaultAuthorizationPolicy.allowedApplications
31- Enabled = $AuthSettings.properties. identityProviders.azureActiveDirectory.enabled
29+ TenantID = $AuthSettings.identityProviders.azureActiveDirectory.registration.openIdIssuer -replace ' https://sts.windows.net/' , ' ' -replace ' /v2.0' , ' '
30+ ClientIDs = $AuthSettings.identityProviders.azureActiveDirectory.validation.defaultAuthorizationPolicy.allowedApplications
31+ Enabled = $AuthSettings.identityProviders.azureActiveDirectory.enabled
3232 }
3333 } else {
3434 throw ' No auth settings found'
You can’t perform that action at this time.
0 commit comments