This commit is contained in:
Isaiah Williams 2020-09-28 16:01:11 -05:00 коммит произвёл GitHub
Родитель 691f6521a1
Коммит 8439188bbe
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 36 добавлений и 6 удалений

Просмотреть файл

@ -46,7 +46,7 @@ Once the prerequisites have been fulfilled and the connector has be installed, y
| Name | Description |
|------|-------------|
| Customer template | *Coming soon* - Template that is intended to be used if you are looking to get insights for your own tenant |
| [Customer template](https://github.com/microsoft/secmgmt-insights-connector/raw/master/templates/secmgmt-insights-customer.pbit) |Template that is intended to be used if you are looking to get insights for your own tenant |
| [Partner template](https://github.com/microsoft/secmgmt-insights-connector/raw/master/templates/secmgmt-insights-partner.pbit) | Template that is intended to be used by partners to gain insights for their customers |
## Contributing

Просмотреть файл

@ -218,7 +218,7 @@ SecMgmtInsights.DetectedApps = (tenants as list, schemaOnly as logical, optional
SecMgmtInsights.DetectedMalwareState = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
let
result = Request.GetData("windowsDeviceMalwareState", schemaOnly, tenants, "beta", true, "/v1.0/deviceManagement/managedDevices?$select=id", query, null, metadata, "tenantId = text, deviceId = text", (input as table) =>
result = Request.GetData("windowsDeviceMalwareState", schemaOnly, tenants, "beta", true, "/v1.0/deviceManagement/managedDevices?$select=id&$filter=(((deviceType eq 'desktop') or (deviceType eq 'windowsRT') or (deviceType eq 'winEmbedded') or (deviceType eq 'surfaceHub') or (deviceType eq 'desktop') or (deviceType eq 'windowsRT') or (deviceType eq 'winEmbedded') or (deviceType eq 'surfaceHub') or (deviceType eq 'windowsPhone') or (deviceType eq 'holoLens')))", query, null, metadata, "tenantId = text, deviceId = text", (input as table) =>
let
renamedColumns = Table.RenameColumns(input, {"id", "deviceId"}, MissingField.Ignore),
requests = Table.AddColumn(renamedColumns, "secMgmtInsightsRequest", each graph_endpoint & "/beta/deviceManagement/managedDevices/" & [deviceId] & "/windowsProtectionState/detectedMalwareState"),
@ -234,6 +234,21 @@ SecMgmtInsights.DeviceCompliancePolicies = (tenants as list, schemaOnly as logic
in
result;
DeviceComplianceSettingStates = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
let
result = Request.GetData("deviceCompliancePolicySettingState", schemaOnly, tenants, "beta", true, "/v1.0/deviceManagement/managedDevices?$select=id", query, null, metadata, "tenantId = text, deviceId = text, policyId = text", (input as table) =>
let
renamedColumns = Table.RenameColumns(input, {"id", "deviceId"}, MissingField.Ignore),
requests = Table.AddColumn(renamedColumns, "secMgmtInsightsRequest", each graph_endpoint & "/v1.0/deviceManagement/managedDevices/" & [deviceId] & "/deviceCompliancePolicyStates?$select=id"),
policies = Rest.Feed(requests, true),
renamePolicyIdColumn = Table.RenameColumns(policies, {"id", "policyId"}, MissingField.Ignore),
stateRequests = Table.AddColumn(renamePolicyIdColumn, "secMgmtInsightsRequest", each graph_endpoint & "/beta/deviceManagement/managedDevices/" & [deviceId] & "/deviceCompliancePolicyStates/" & [policyId] & "/settingStates"),
output = Rest.Feed(stateRequests, true)
in
output)
in
result;
SecMgmtInsights.DeviceCompliancePolicySettingStates = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
let
result = Request.GetData("deviceCompliancePolicySettingState", schemaOnly, tenants, "beta", true, "/v1.0/deviceManagement/managedDevices?$select=id", query, null, metadata, "tenantId = text, deviceId = text, policyId = text", (input as table) =>
@ -267,6 +282,21 @@ SecMgmtInsights.DeviceConfigurationProfiles = (tenants as list, schemaOnly as lo
in
result;
DeviceConfigurationDeviceSettingStates = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
let
result = Request.GetData("deviceConfigurationSettingState", schemaOnly, tenants, "beta", true, "/v1.0/deviceManagement/managedDevices?$select=id", query, null, metadata, "tenantId = text, deviceId = text, policyId = text", (input as table) =>
let
renamedColumns = Table.RenameColumns(input, {"id", "deviceId"}, MissingField.Ignore),
requests = Table.AddColumn(renamedColumns, "secMgmtInsightsRequest", each graph_endpoint & "/v1.0/deviceManagement/managedDevices/" & [deviceId] & "/deviceConfigurationStates?$select=id"),
policies = Rest.Feed(requests, true),
renamePolicyIdColumn = Table.RenameColumns(policies, {"id", "policyId"}, MissingField.Ignore),
stateRequests = Table.AddColumn(renamePolicyIdColumn, "secMgmtInsightsRequest", each graph_endpoint & "/beta/deviceManagement/managedDevices/" & [deviceId] & "/deviceConfigurationStates/" & [policyId] & "/settingStates"),
output = Rest.Feed(stateRequests, true)
in
output)
in
result;
SecMgmtInsights.DeviceConfigurationProfileSettingStates = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
let
result = Request.GetData("deviceConfigurationSettingState", schemaOnly, tenants, "beta", true, "/v1.0/deviceManagement/managedDevices?$select=id", query, null, metadata, "tenantId = text, deviceId = text, policyId = text", (input as table) =>
@ -459,7 +489,7 @@ EntityTable = #table({"Entity", "Action"}, {
{ "CredentialUserRegistrationDetails", SecMgmtInsights.CredentialUserRegistrationDetails },
{ "DetectedApps", SecMgmtInsights.DetectedApps },
{ "DetectedMalwareState", SecMgmtInsights.DetectedMalwareState },
{ "DeviceActions", SecMgmtInsights.DeviceActions },
{ "DeviceActions", DeviceActions },
{ "DeviceCompliancePolicies", SecMgmtInsights.DeviceCompliancePolicies },
{ "DeviceCompliancePolicySettingStates", SecMgmtInsights.DeviceCompliancePolicySettingStates },
{ "DeviceCompliancePolicyStates", SecMgmtInsights.DeviceCompliancePolicyStates },
@ -573,7 +603,7 @@ SecMgmtInsights.Controls = (tenants as list, schemaOnly as logical, optional que
in
output;
SecMgmtInsights.DeviceActions = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
DeviceActions = (tenants as list, schemaOnly as logical, optional query as text, optional schema as type, optional metadata as table) =>
let
GetActions = (input as table, expectedValue as text, id as text, resource as text, tenantId as text) =>
let
@ -604,8 +634,8 @@ SecMgmtInsights.DeviceActions = (tenants as list, schemaOnly as logical, optiona
deviceComplianceControls = Table.SelectRows(controls, each [resource] = "deviceCompliancePolicy"),
deviceConfigurationControls = Table.SelectRows(controls, each [resource] = "deviceConfigurationPolicy"),
deviceCompliancePolicySettingStates = SecMgmtInsights.DeviceCompliancePolicySettingStates(tenants, false, "$select=setting,state,currentValue,errorCode,errorDescription"),
deviceConfigurationProfileSettingStates = SecMgmtInsights.DeviceConfigurationProfileSettingStates(tenants, false, "$select=setting,state,currentValue,errorCode,errorDescription"),
deviceCompliancePolicySettingStates = DeviceComplianceSettingStates(tenants, false),
deviceConfigurationProfileSettingStates = DeviceConfigurationDeviceSettingStates(tenants, false),
deviceComplianceActions = Table.AddColumn(deviceComplianceControls, "action", each GetActions(deviceCompliancePolicySettingStates, [expectedValue], [id], [resource], [tenantId])),
deviceConfigurationActions = Table.AddColumn(deviceConfigurationControls, "action", each GetActions(deviceConfigurationProfileSettingStates, [expectedValue], [id], [resource], [tenantId])),

Двоичные данные
templates/secmgmt-insights-customer.pbit Normal file

Двоичный файл не отображается.