{"id":3487,"date":"2020-10-05T07:48:56","date_gmt":"2020-10-05T06:48:56","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=3487"},"modified":"2020-10-05T07:48:56","modified_gmt":"2020-10-05T06:48:56","slug":"grouping-devices-in-mdatp-based-on-registered-users","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2020\/10\/grouping-devices-in-mdatp-based-on-registered-users\/","title":{"rendered":"Grouping devices in MDATP based on registered users"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Microsoft Defender Advanced Threat Protection seems to be becoming the defacto leader in the A\/V industry, at least when Windows is concerned, but other OS&#8217;es seem to be following quickly \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At one of my international customers, many different locations and departments exist and we&#8217;d like to group devices in MDATP based on their primary user so we can assigned different administrators automatically, and apply<a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/security\/threat-protection\/microsoft-defender-atp\/web-content-filtering\" target=\"_blank\" rel=\"noreferrer noopener\"> different web filtering policies<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MDATP has the following options available for grouping:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2020\/10\/mdatp-grouping-rules.png\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"251\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2020\/10\/mdatp-grouping-rules.png\" alt=\"\" class=\"wp-image-3488\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2020\/10\/mdatp-grouping-rules.png 560w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2020\/10\/mdatp-grouping-rules-300x134.png 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These membership rules don&#8217;t say anything about the user, and the machine domains are all cloud native (no hybrid joins). So we need to use Tags to gain flexible targeting in MDATP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following PowerShell script can be scheduled as an Azure Runbook to automatically tag all your MDATP devices based on the &#8216;Company&#8217; attribute of the device&#8217;s primary user. It could also be modified easily to e.g. parse a user&#8217;s group membership or UPN&#8217;s domain. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gitlab.com\/Lieben\/assortedFunctions\/-\/blob\/master\/set-MDATPCustomTags.ps1\">https:\/\/gitlab.com\/Lieben\/assortedFunctions\/-\/blob\/master\/set-MDATPCustomTags.ps1<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have a lot of devices, it may take a while for the first run (beyond Azure Automation limits), in that case run it locally first and then schedule it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft Defender Advanced Threat Protection seems to be becoming the defacto leader in the A\/V industry, at least when Windows is concerned, but other OS&#8217;es seem to be following quickly \ud83d\ude42 At one of my international customers, many different locations and departments exist and we&#8217;d like to group devices in MDATP based on their primary &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2020\/10\/grouping-devices-in-mdatp-based-on-registered-users\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Grouping devices in MDATP based on registered users<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[4,12,25,39,43],"tags":[],"class_list":["post-3487","post","type-post","status-publish","format-standard","hentry","category-automation","category-ems","category-mdatp","category-powershell","category-security"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=3487"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3487\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=3487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=3487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=3487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}