SHELL/9.1.9.ps1
|
$CheckId = "9.1.9" $Title = "Ensure 'Block ResourceKey Authentication' is 'Enabled'" $Level = "L1" $BenchmarkType = "Automated" $SettingName = "BlockResourceKeyAuthentication" $SettingTitle = "Block ResourceKey Authentication" $HelperPath = Join-Path $PSScriptRoot "helpers\fabric_settings_helpers.ps1" $AuditCommands = @( "Invoke-RestMethod -Uri 'https://api.fabric.microsoft.com/v1/admin/tenantsettings' -Method Get", "Find setting by settingName 'BlockResourceKeyAuthentication' or title 'Block ResourceKey Authentication'" ) if (-not (Test-Path $HelperPath)) { [pscustomobject]@{ CheckId = $CheckId Title = $Title Level = $Level BenchmarkType = $BenchmarkType Status = "ERROR" Pass = $null Evidence = [pscustomobject]@{ AuditCommands = $AuditCommands HelperPath = $HelperPath SourceDocument = "CIS_Microsoft_365_Foundations_Benchmark_v6.0.1" } Error = "Required helper file not found: $HelperPath" Timestamp = Get-Date } return } . $HelperPath Invoke-Root365FabricControl ` -CheckId $CheckId ` -Title $Title ` -Level $Level ` -BenchmarkType $BenchmarkType ` -SettingName $SettingName ` -SettingTitle $SettingTitle ` -Mode "Enable" ` -MissingSettingBehavior "Fail" ` -AuditCommands $AuditCommands ` -ExpectedStateDescription "Enabled." |