DscResources/AzureAD/AzureAD.schema.psm1
# (2024-05-30 01:13:05) Generated using Microsoft365DSC v1.24.529.1 Configuration 'AzureAD' { param ( [Parameter(Mandatory = $true)] [System.String] $ApplicationId, [Parameter(Mandatory = $true)] [System.String] $TenantId, [Parameter(Mandatory = $true)] [System.String] $CertificateThumbprint ) Import-DscResource -ModuleName Microsoft365DSC foreach ($ActivityBasedTimeoutPolicy in $ConfigurationData.NonNodeData.AzureAD.ActivityBasedTimeoutPolicies) { $resourceTitle = 'AADActivityBasedTimeoutPolicy-{0}' -f $ActivityBasedTimeoutPolicy.DisplayName $parameters = $ActivityBasedTimeoutPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADActivityBasedTimeoutPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AdministrativeUnit in $ConfigurationData.NonNodeData.AzureAD.AdministrativeUnits) { $resourceTitle = 'AADAdministrativeUnit-{0}' -f $AdministrativeUnit.DisplayName $parameters = $AdministrativeUnit $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('Members')) { $parameters.Members = $parameters.Members | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphMember' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('ScopedRoleMembers')) { $parameters.ScopedRoleMembers = $parameters.ScopedRoleMembers | ForEach-Object { if ($_.ContainsKey('RoleMemberInfo')) { $_.RoleMemberInfo = $_.RoleMemberInfo | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphMember' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphScopedRoleMembership' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAdministrativeUnit' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($Application in $ConfigurationData.NonNodeData.AzureAD.Applications) { $resourceTitle = 'AADApplication-{0}' -f $Application.DisplayName $parameters = $Application $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('Permissions')) { $parameters.Permissions = $parameters.Permissions | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADApplicationPermission' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADApplication' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AttributeSet in $ConfigurationData.NonNodeData.AzureAD.AttributeSets) { $resourceTitle = 'AADAttributeSet-{0}' -f $AttributeSet.Id $parameters = $AttributeSet $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADAttributeSet' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationContextClassReference in $ConfigurationData.NonNodeData.AzureAD.AuthenticationContextClassReferences) { $resourceTitle = 'AADAuthenticationContextClassReference-{0}' -f $AuthenticationContextClassReference.Id $parameters = $AuthenticationContextClassReference $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADAuthenticationContextClassReference' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicy in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPolicies) { $resourceTitle = 'AADAuthenticationMethodPolicy-{0}' -f $AuthenticationMethodPolicy.DisplayName $parameters = $AuthenticationMethodPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('RegistrationEnforcement')) { $parameters.RegistrationEnforcement = $parameters.RegistrationEnforcement | ForEach-Object { if ($_.ContainsKey('AuthenticationMethodsRegistrationCampaign')) { $_.AuthenticationMethodsRegistrationCampaign = $_.AuthenticationMethodsRegistrationCampaign | ForEach-Object { if ($_.ContainsKey('ExcludeTargets')) { $_.ExcludeTargets = $_.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('IncludeTargets')) { $_.IncludeTargets = $_.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphAuthenticationMethodsRegistrationCampaignIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphAuthenticationMethodsRegistrationCampaign' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphregistrationEnforcement' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('SystemCredentialPreferences')) { $parameters.SystemCredentialPreferences = $parameters.SystemCredentialPreferences | ForEach-Object { if ($_.ContainsKey('ExcludeTargets')) { $_.ExcludeTargets = $_.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('IncludeTargets')) { $_.IncludeTargets = $_.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphsystemCredentialPreferences' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicyAuthenticator in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesAuthenticator) { $resourceTitle = 'AADAuthenticationMethodPolicyAuthenticator-{0}' -f $AuthenticationMethodPolicyAuthenticator.Id $parameters = $AuthenticationMethodPolicyAuthenticator $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('FeatureSettings')) { $parameters.FeatureSettings = $parameters.FeatureSettings | ForEach-Object { if ($_.ContainsKey('CompanionAppAllowedState')) { $_.CompanionAppAllowedState = $_.CompanionAppAllowedState | ForEach-Object { if ($_.ContainsKey('ExcludeTarget')) { $_.ExcludeTarget = $_.ExcludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('IncludeTarget')) { $_.IncludeTarget = $_.IncludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('DisplayAppInformationRequiredState')) { $_.DisplayAppInformationRequiredState = $_.DisplayAppInformationRequiredState | ForEach-Object { if ($_.ContainsKey('ExcludeTarget')) { $_.ExcludeTarget = $_.ExcludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('IncludeTarget')) { $_.IncludeTarget = $_.IncludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('DisplayLocationInformationRequiredState')) { $_.DisplayLocationInformationRequiredState = $_.DisplayLocationInformationRequiredState | ForEach-Object { if ($_.ContainsKey('ExcludeTarget')) { $_.ExcludeTarget = $_.ExcludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('IncludeTarget')) { $_.IncludeTarget = $_.IncludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('NumberMatchingRequiredState')) { $_.NumberMatchingRequiredState = $_.NumberMatchingRequiredState | ForEach-Object { if ($_.ContainsKey('ExcludeTarget')) { $_.ExcludeTarget = $_.ExcludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('IncludeTarget')) { $_.IncludeTarget = $_.IncludeTarget | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphmicrosoftAuthenticatorFeatureSettings' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyAuthenticatorIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicyAuthenticator' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicyEmail in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesEmail) { $resourceTitle = 'AADAuthenticationMethodPolicyEmail-{0}' -f $AuthenticationMethodPolicyEmail.Id $parameters = $AuthenticationMethodPolicyEmail $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyEmailExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyEmailIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicyEmail' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicyFido2 in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesFido2) { $resourceTitle = 'AADAuthenticationMethodPolicyFido2-{0}' -f $AuthenticationMethodPolicyFido2.Id $parameters = $AuthenticationMethodPolicyFido2 $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('KeyRestrictions')) { $parameters.KeyRestrictions = $parameters.KeyRestrictions | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphfido2KeyRestrictions' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyFido2ExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyFido2IncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicyFido2' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicySms in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesSms) { $resourceTitle = 'AADAuthenticationMethodPolicySms-{0}' -f $AuthenticationMethodPolicySms.Id $parameters = $AuthenticationMethodPolicySms $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicySmsExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicySmsIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicySms' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicySoftware in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesSoftware) { $resourceTitle = 'AADAuthenticationMethodPolicySoftware-{0}' -f $AuthenticationMethodPolicySoftware.Id $parameters = $AuthenticationMethodPolicySoftware $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicySoftwareExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicySoftwareIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicySoftware' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicyTemporary in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPolicyTemporaries) { $resourceTitle = 'AADAuthenticationMethodPolicyTemporary-{0}' -f $AuthenticationMethodPolicyTemporary.Id $parameters = $AuthenticationMethodPolicyTemporary $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyTemporaryExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyTemporaryIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicyTemporary' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicyVoice in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesVoice) { $resourceTitle = 'AADAuthenticationMethodPolicyVoice-{0}' -f $AuthenticationMethodPolicyVoice.Id $parameters = $AuthenticationMethodPolicyVoice $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyVoiceExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyVoiceIncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicyVoice' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationMethodPolicyX509 in $ConfigurationData.NonNodeData.AzureAD.AuthenticationMethodPoliciesX509) { $resourceTitle = 'AADAuthenticationMethodPolicyX509-{0}' -f $AuthenticationMethodPolicyX509.Id $parameters = $AuthenticationMethodPolicyX509 $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AuthenticationModeConfiguration')) { $parameters.AuthenticationModeConfiguration = $parameters.AuthenticationModeConfiguration | ForEach-Object { if ($_.ContainsKey('Rules')) { $_.Rules = $_.Rules | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphX509CertificateRule' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphx509CertificateAuthenticationModeConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('CertificateUserBindings')) { $parameters.CertificateUserBindings = $parameters.CertificateUserBindings | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphx509CertificateUserBinding' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('ExcludeTargets')) { $parameters.ExcludeTargets = $parameters.ExcludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyX509ExcludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('IncludeTargets')) { $parameters.IncludeTargets = $parameters.IncludeTargets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADAuthenticationMethodPolicyX509IncludeTarget' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADAuthenticationMethodPolicyX509' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AuthenticationStrengthPolicy in $ConfigurationData.NonNodeData.AzureAD.AuthenticationStrengthPolicies) { $resourceTitle = 'AADAuthenticationStrengthPolicy-{0}' -f $AuthenticationStrengthPolicy.DisplayName $parameters = $AuthenticationStrengthPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADAuthenticationStrengthPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('AuthorizationPolicy')) { $resourceTitle = 'AuthorizationPolicyDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.AuthorizationPolicy $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADAuthorizationPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ConditionalAccessPolicy in $ConfigurationData.NonNodeData.AzureAD.ConditionalAccessPolicies) { $resourceTitle = 'AADConditionalAccessPolicy-{0}' -f $ConditionalAccessPolicy.DisplayName $parameters = $ConditionalAccessPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADConditionalAccessPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('CrossTenantAccessPolicy')) { $resourceTitle = 'CrossTenantAccessPolicyDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.CrossTenantAccessPolicy $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADCrossTenantAccessPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('CrossTenantAccessPolicyConfigurationDefault')) { $resourceTitle = 'CrossTenantAccessPolicyConfigurationDefaultDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.CrossTenantAccessPolicyConfigurationDefault $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('B2BCollaborationInbound')) { $parameters.B2BCollaborationInbound = $parameters.B2BCollaborationInbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('B2BCollaborationOutbound')) { $parameters.B2BCollaborationOutbound = $parameters.B2BCollaborationOutbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('B2BDirectConnectInbound')) { $parameters.B2BDirectConnectInbound = $parameters.B2BDirectConnectInbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('B2BDirectConnectOutbound')) { $parameters.B2BDirectConnectOutbound = $parameters.B2BDirectConnectOutbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('InboundTrust')) { $parameters.InboundTrust = $parameters.InboundTrust | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyInboundTrust' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADCrossTenantAccessPolicyConfigurationDefault' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($CrossTenantAccessPolicyConfigurationPartner in $ConfigurationData.NonNodeData.AzureAD.CrossTenantAccessPoliciesConfigurationPartner) { $resourceTitle = 'AADCrossTenantAccessPolicyConfigurationPartner-{0}' -f $CrossTenantAccessPolicyConfigurationPartner.PartnerTenantId $parameters = $CrossTenantAccessPolicyConfigurationPartner $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('B2BCollaborationInbound')) { $parameters.B2BCollaborationInbound = $parameters.B2BCollaborationInbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('B2BCollaborationOutbound')) { $parameters.B2BCollaborationOutbound = $parameters.B2BCollaborationOutbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('B2BDirectConnectInbound')) { $parameters.B2BDirectConnectInbound = $parameters.B2BDirectConnectInbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('B2BDirectConnectOutbound')) { $parameters.B2BDirectConnectOutbound = $parameters.B2BDirectConnectOutbound | ForEach-Object { if ($_.ContainsKey('Applications')) { $_.Applications = $_.Applications | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UsersAndGroups')) { $_.UsersAndGroups = $_.UsersAndGroups | ForEach-Object { if ($_.ContainsKey('Targets')) { $_.Targets = $_.Targets | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTarget' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyTargetConfiguration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyB2BSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('AutomaticUserConsentSettings')) { $parameters.AutomaticUserConsentSettings = $parameters.AutomaticUserConsentSettings | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyAutomaticUserConsentSettings' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('InboundTrust')) { $parameters.InboundTrust = $parameters.InboundTrust | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADCrossTenantAccessPolicyInboundTrust' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADCrossTenantAccessPolicyConfigurationPartner' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($EntitlementManagementAccessPackage in $ConfigurationData.NonNodeData.AzureAD.EntitlementManagementAccessPackages) { $resourceTitle = 'AADEntitlementManagementAccessPackage-{0}' -f $EntitlementManagementAccessPackage.DisplayName $parameters = $EntitlementManagementAccessPackage $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AccessPackageResourceRoleScopes')) { $parameters.AccessPackageResourceRoleScopes = $parameters.AccessPackageResourceRoleScopes | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AccessPackageResourceRoleScope' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADEntitlementManagementAccessPackage' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($EntitlementManagementAccessPackageAssignmentPolicy in $ConfigurationData.NonNodeData.AzureAD.EntitlementManagementAccessPackageAssignmentPolicies) { $resourceTitle = 'AADEntitlementManagementAccessPackageAssignmentPolicy-{0}' -f $EntitlementManagementAccessPackageAssignmentPolicy.DisplayName $parameters = $EntitlementManagementAccessPackageAssignmentPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AccessReviewSettings')) { $parameters.AccessReviewSettings = $parameters.AccessReviewSettings | ForEach-Object { if ($_.ContainsKey('Reviewers')) { $_.Reviewers = $_.Reviewers | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphuserset' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphassignmentreviewsettings' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('Questions')) { $parameters.Questions = $parameters.Questions | ForEach-Object { if ($_.ContainsKey('QuestionText')) { $_.QuestionText = $_.QuestionText | ForEach-Object { if ($_.ContainsKey('LocalizedTexts')) { $_.LocalizedTexts = $_.LocalizedTexts | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedText' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedContent' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Choices')) { $_.Choices = $_.Choices | ForEach-Object { if ($_.ContainsKey('displayValue')) { $_.displayValue = $_.displayValue | ForEach-Object { if ($_.ContainsKey('LocalizedTexts')) { $_.LocalizedTexts = $_.LocalizedTexts | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedText' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedContent' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageAnswerChoice' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccesspackagequestion' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('RequestApprovalSettings')) { $parameters.RequestApprovalSettings = $parameters.RequestApprovalSettings | ForEach-Object { if ($_.ContainsKey('ApprovalStages')) { $_.ApprovalStages = $_.ApprovalStages | ForEach-Object { if ($_.ContainsKey('PrimaryApprovers')) { $_.PrimaryApprovers = $_.PrimaryApprovers | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphuserset' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('EscalationApprovers')) { $_.EscalationApprovers = $_.EscalationApprovers | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphuserset' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphapprovalstage1' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphapprovalsettings' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('RequestorSettings')) { $parameters.RequestorSettings = $parameters.RequestorSettings | ForEach-Object { if ($_.ContainsKey('AllowedRequestors')) { $_.AllowedRequestors = $_.AllowedRequestors | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphuserset' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphrequestorsettings' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('CustomExtensionHandlers')) { $parameters.CustomExtensionHandlers = $parameters.CustomExtensionHandlers | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphcustomextensionhandler' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADEntitlementManagementAccessPackageAssignmentPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($EntitlementManagementAccessPackageCatalog in $ConfigurationData.NonNodeData.AzureAD.EntitlementManagementAccessPackageCatalogs) { $resourceTitle = 'AADEntitlementManagementAccessPackageCatalog-{0}' -f $EntitlementManagementAccessPackageCatalog.DisplayName $parameters = $EntitlementManagementAccessPackageCatalog $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADEntitlementManagementAccessPackageCatalog' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($EntitlementManagementAccessPackageCatalogResource in $ConfigurationData.NonNodeData.AzureAD.EntitlementManagementAccessPackageCatalogResources) { $resourceTitle = 'AADEntitlementManagementAccessPackageCatalogResource-{0}' -f $EntitlementManagementAccessPackageCatalogResource.DisplayName $parameters = $EntitlementManagementAccessPackageCatalogResource $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('Attributes')) { $parameters.Attributes = $parameters.Attributes | ForEach-Object { if ($_.ContainsKey('AttributeDestination')) { $_.AttributeDestination = $_.AttributeDestination | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccesspackageresourceattributedestination' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('AttributeSource')) { $_.AttributeSource = $_.AttributeSource | ForEach-Object { if ($_.ContainsKey('Question')) { $_.Question = $_.Question | ForEach-Object { if ($_.ContainsKey('QuestionText')) { $_.QuestionText = $_.QuestionText | ForEach-Object { if ($_.ContainsKey('LocalizedTexts')) { $_.LocalizedTexts = $_.LocalizedTexts | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedText' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedContent' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Choices')) { $_.Choices = $_.Choices | ForEach-Object { if ($_.ContainsKey('displayValue')) { $_.displayValue = $_.displayValue | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageLocalizedContent' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageAnswerChoice' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccessPackageResourceAttributeQuestion' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccesspackageresourceattributesource' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_MicrosoftGraphaccesspackageresourceattribute' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADEntitlementManagementAccessPackageCatalogResource' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($EntitlementManagementConnectedOrganization in $ConfigurationData.NonNodeData.AzureAD.EntitlementManagementConnectedOrganizations) { $resourceTitle = 'AADEntitlementManagementConnectedOrganization-{0}' -f $EntitlementManagementConnectedOrganization.DisplayName $parameters = $EntitlementManagementConnectedOrganization $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('IdentitySources')) { $parameters.IdentitySources = $parameters.IdentitySources | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADEntitlementManagementConnectedOrganizationIdentitySource' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADEntitlementManagementConnectedOrganization' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('ExternalIdentityPolicy')) { $resourceTitle = 'ExternalIdentityPolicyDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.ExternalIdentityPolicy $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADExternalIdentityPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($Group in $ConfigurationData.NonNodeData.AzureAD.Groups) { $resourceTitle = 'AADGroup-{0}-{1}' -f $Group.DisplayName,$Group.MailNickname $parameters = $Group $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AssignedLicenses')) { $parameters.AssignedLicenses = $parameters.AssignedLicenses | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADGroupLicense' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADGroup' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('GroupLifecyclePolicy')) { $resourceTitle = 'GroupLifecyclePolicyDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.GroupLifecyclePolicy $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADGroupLifecyclePolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('GroupsNamingPolicy')) { $resourceTitle = 'GroupsNamingPolicyDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.GroupsNamingPolicy $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADGroupsNamingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('GroupsSettings')) { $resourceTitle = 'GroupsSettingsDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.GroupsSettings $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADGroupsSettings' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($NamedLocationPolicy in $ConfigurationData.NonNodeData.AzureAD.NamedLocationPolicies) { $resourceTitle = 'AADNamedLocationPolicy-{0}' -f $NamedLocationPolicy.DisplayName $parameters = $NamedLocationPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADNamedLocationPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RoleDefinition in $ConfigurationData.NonNodeData.AzureAD.RoleDefinitions) { $resourceTitle = 'AADRoleDefinition-{0}' -f $RoleDefinition.DisplayName $parameters = $RoleDefinition $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADRoleDefinition' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RoleEligibilityScheduleRequest in $ConfigurationData.NonNodeData.AzureAD.RoleEligibilityScheduleRequests) { $resourceTitle = 'AADRoleEligibilityScheduleRequest-{0}-{1}' -f $RoleEligibilityScheduleRequest.Principal,$RoleEligibilityScheduleRequest.RoleDefinition $parameters = $RoleEligibilityScheduleRequest $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ScheduleInfo')) { $parameters.ScheduleInfo = $parameters.ScheduleInfo | ForEach-Object { if ($_.ContainsKey('expiration')) { $_.expiration = $_.expiration | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADRoleEligibilityScheduleRequestScheduleExpiration' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('recurrence')) { $_.recurrence = $_.recurrence | ForEach-Object { if ($_.ContainsKey('pattern')) { $_.pattern = $_.pattern | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrencePattern' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('range')) { $_.range = $_.range | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrenceRange' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrence' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADRoleEligibilityScheduleRequestSchedule' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('TicketInfo')) { $parameters.TicketInfo = $parameters.TicketInfo | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADRoleEligibilityScheduleRequestTicketInfo' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADRoleEligibilityScheduleRequest' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RoleSetting in $ConfigurationData.NonNodeData.AzureAD.RoleSettings) { $resourceTitle = 'AADRoleSetting-{0}' -f $RoleSetting.DisplayName $parameters = $RoleSetting $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADRoleSetting' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('SecurityDefaults')) { $resourceTitle = 'SecurityDefaultsDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.SecurityDefaults $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADSecurityDefaults' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ServicePrincipal in $ConfigurationData.NonNodeData.AzureAD.ServicePrincipals) { $resourceTitle = 'AADServicePrincipal-{0}' -f $ServicePrincipal.AppId $parameters = $ServicePrincipal $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AppRoleAssignedTo')) { $parameters.AppRoleAssignedTo = $parameters.AppRoleAssignedTo | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_AADServicePrincipalRoleAssignment' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'AADServicePrincipal' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($SocialIdentityProvider in $ConfigurationData.NonNodeData.AzureAD.SocialIdentityProviders) { $resourceTitle = 'AADSocialIdentityProvider-{0}' -f $SocialIdentityProvider.ClientId $parameters = $SocialIdentityProvider $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADSocialIdentityProvider' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } if ($ConfigurationData.NonNodeData.AzureAD.ContainsKey('TenantDetails')) { $resourceTitle = 'TenantDetailsDefaults' $parameters = $ConfigurationData.NonNodeData.AzureAD.TenantDetails $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADTenantDetails' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($TokenLifetimePolicy in $ConfigurationData.NonNodeData.AzureAD.TokenLifetimePolicies) { $resourceTitle = 'AADTokenLifetimePolicy-{0}' -f $TokenLifetimePolicy.DisplayName $parameters = $TokenLifetimePolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADTokenLifetimePolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($User in $ConfigurationData.NonNodeData.AzureAD.Users) { $resourceTitle = 'AADUser-{0}' -f $User.UserPrincipalName $parameters = $User $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'AADUser' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } } |