Skip to content

Commit

Permalink
Updated SC export functions to force authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Feb 21, 2025
1 parent ba6242b commit 5e34a03
Show file tree
Hide file tree
Showing 29 changed files with 30 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#region Telemetry
$ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#region Telemetry
$ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters
#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1052,8 +1052,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ function Export-TargetResource
)

$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@ function Export-TargetResource
$AccessTokens
)
$ConnectionMode = New-M365DSCConnection -Workload 'SecurityComplianceCenter' `
-InboundParameters $PSBoundParameters `
-SkipModuleReload $true
-InboundParameters $PSBoundParameters

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down

0 comments on commit 5e34a03

Please sign in to comment.