{"id":3086,"date":"2019-04-11T12:18:14","date_gmt":"2019-04-11T11:18:14","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=3086"},"modified":"2019-04-11T12:18:14","modified_gmt":"2019-04-11T11:18:14","slug":"azure-ad-sign-in-and-audit-log-retention","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2019\/04\/azure-ad-sign-in-and-audit-log-retention\/","title":{"rendered":"Azure AD sign in and audit log retention"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Often we, as cloud admins, need our audit or sign in logs. Usually, we need real-time data because, for example, we&#8217;re debugging why that one user has conditional access issues. But sometimes, <strong>we need to go back further than 30 days.<\/strong> And that is not something Azure does by default, but can be enabled:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1416\" height=\"618\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image.png\" alt=\"\" class=\"wp-image-3087\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image.png 1416w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-300x131.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-1024x447.png 1024w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-768x335.png 768w\" sizes=\"auto, (max-width: 1416px) 100vw, 1416px\" \/><\/a><figcaption><br><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Our options when exporting logs are limited to a Storage account, Log Analytics or an Event Hub. All these options offer multiple extraction methods to cover your transport needs to other systems. The default retention period is then <strong>forever<\/strong>, which is nice as we might need audit info going back a bit as <a rel=\"noreferrer noopener\" aria-label=\"hacks are usually discovered after 206 days. (opens in a new tab)\" href=\"https:\/\/www.itgovernanceusa.com\/blog\/how-long-does-it-take-to-detect-a-cyber-attack\" target=\"_blank\">hacks are usually discovered after about 206 days.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you don&#8217;t have specific tools or requirements, I recommend setting up a Log Analytics workspace and connecting that to Azure AD:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"776\" height=\"800\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-1.png\" alt=\"\" class=\"wp-image-3088\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-1.png 776w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-1-291x300.png 291w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-1-768x792.png 768w\" sizes=\"auto, (max-width: 776px) 100vw, 776px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Whichever method you choose, a P1 or P2 license is required. You only need a single license for the entire tenant when using the export audit \/ singin log functionality of AzureAD. Once configured, the Logs option directly bring you to the Log Analytics workspace search results:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1614\" height=\"750\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2.png\" alt=\"\" class=\"wp-image-3091\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2.png 1614w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2-300x139.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2-1024x476.png 1024w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2-768x357.png 768w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/04\/image-2-1536x714.png 1536w\" sizes=\"auto, (max-width: 1614px) 100vw, 1614px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve briefly shown how to configure AzureAD to send audit and sign in logs to Log Analytics so you can go back further than 30 days. Stay tuned for the next post that will utilize these logs to dive deeper into Guest User activity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often we, as cloud admins, need our audit or sign in logs. Usually, we need real-time data because, for example, we&#8217;re debugging why that one user has conditional access issues. But sometimes, we need to go back further than 30 days. And that is not something Azure does by default, but can be enabled: Our &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2019\/04\/azure-ad-sign-in-and-audit-log-retention\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Azure AD sign in and audit log retention<\/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":[5,7,21,43],"tags":[],"class_list":["post-3086","post","type-post","status-publish","format-standard","hentry","category-azure","category-azuread","category-identity","category-security"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3086","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=3086"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3086\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=3086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=3086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=3086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}