How to Generate a Azure Security Center exemption and disable policy report

Published 04-28-2021 09:41 AM 964 Views
Microsoft

While recently working with a customer’s Governance Risk and Compliance team (GRC) the discussion pivoted to the ability to exempt Azure resources from policies or disable the policy to reflect the Secure Score correctly for their environment. GRC teams may want on a quarterly or monthly basis to produce a report of the exemptions to review and discuss or hand over to auditors looking to see the exemption story.

 

The Exemption capabilities in Azure Security Center utilize Azure Policy exemptions that have been around for a bit now. @Tom Janetscheck has written quite a bit about the capability and provided some unique Workflow automations around

 

Submitting a exemption via Logic App

 

Notifying an Exemption via Logic App

 

Both are very great workflow automations the GRC team can adopt at an enterprise. Your GRC team may be looking for an easy to pull report they could download around the exemptions and the azure resources to quickly audit findings.

 

Let’s examine a few ways you can pull this information within the Azure Portal, Azure Resource Graph, and use a new PowerShell Script to download a detailed report.

 

Azure Portal – Policy - Assignments blade

 

When you want a quick view of the exemptions for a particular subscription within the Azure Portal for Policy you can leverage the Assignments blade to list those exemptions. In addition, if you have written access you can update or create new exemptions as well.

 

Within the Azure Portal go to Policy and click on the Assignments blade, within there, click on ASC Default assignment.

 

policyui.png

 

Click on the Exemptions Tab, if you have write access to policy assignments you can also click on the … and edit the exemption too see more details

 

exempsui.png

 

editexmp.png

 

Azure Resource Graph

 

Some of the exemption values are stored as data in Azure Resource Graph and specifically the securityresources table. If you are unfamiliar with the Azure Resource Graph the Azure Portal’s top search bar is also powered by it and helps return fast results. It is a great way to not invoke a GET Azure Resource API call for each Azure resource details and configurations as their state and information are stored here.

 

arg.png

 

Within the table Azure does store some information around the ASC recommendations and their states, including the exemptions and policies disabled.

 

You can now run a KQL query in Azure Resource Graph to generate a report.

 

 

securityresources
        | where type == "microsoft.security/assessments"
        | extend source = tostring(properties.resourceDetails.Source)
        | extend resourceId =
            trim(" ", tolower(tostring(case(source =~ "azure", properties.resourceDetails.Id,
                                            source =~ "aws", properties.resourceDetails.AzureResourceId,
                                            source =~ "gcp", properties.resourceDetails.AzureResourceId,
                                            extract("^(.+)/providers/Microsoft.Security/assessments/.+$",1,id)))))
        | extend status = trim(" ", tostring(properties.status.code))
        | extend cause = trim(" ", tostring(properties.status.cause))
        | extend assessmentKey = tostring(name)
        | where cause == "Exempt" or cause == "OffByPolicy"
        | extend ResourceName = tostring(split(resourceId,'/')[8]), RecommendationName = tostring(properties.displayName), Source = properties.resourceDetails.Source, StatusCause = tostring(properties.status.cause), StatusDescription = properties.status.description, RecommendationSeverity = tostring(properties.metadata.severity)
        | project RecommendationName, RecommendationSeverity, ResourceName, StatusCause, StatusDescription, resourceGroup, Source, subscriptionId
        | sort by RecommendationSeverity, RecommendationName

 

 

For a comprehensive and better visual listing experience, be sure to set the query to run on all Azure Subscriptions and Formatted Results turned on. You can then download the report to a CSV file for the auditors or for review of the exceptions and disabled policies.

 

arg.png

 

You can find the KQL query here in the Azure Security Center GitHub repo.

 

Generate-ExemptionReport.ps1

 

For a more comprehensive and detailed report that includes Notes in the exemption, expiration dates for exemptions, and who created the exemptions you can now utilize the following PowerShell script which executes across Azure Subscriptions and invokes an API to get the details:

 

Microsoft.Authorization/policyExemptions?api-version=2020-07-01-preview

 

To use the script you can download here from the GitHub Repo and open PowerShell.

 

Within PowerShell be sure to log into an Azure using Connect-AzAccount and using the login of someone who has a large amount of reader access across your Azure enterprises subscriptions. You may see some errors please ignore for now as the script will be tuned over time to support additional scenarios.

 

The end result is nicely generated CSV with all the details around the exemptions that can be imported into Excel, PowerBI, or other data visualization products.

 

As an example you can import into into Excel, Open a new Excel sheet and got to the ‘Data’ tab and use the button ‘From Test/CSV’

 

excel.png

 

Once imported you can pivot and filter as needed

 

report.png

 

In this article you explored several ways to examine and generate an exemption report. You can use the Azure Portal – Policy – Assignments blade to quickly view all the Exemptions. You can use the Azure Resource Graph and a KQL Query to generate a simplified exemption and policy disable report. Finally you can use a PowerShell script to generate a detailed exemption and policy disable report that includes notes, expiration date and time, and who created the exemption. These reports can be used in a quarterly or month basis for you GRC team to review and discuss or handed over to auditors looking to see the exemption story.

 

Special thanks to:

@Yuri Diogenes for reviewing this post

%3CLINGO-SUB%20id%3D%22lingo-sub-2302899%22%20slang%3D%22en-US%22%3EHow%20to%20Generate%20a%20Azure%20Security%20Center%20exemption%20and%20disable%20policy%20report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2302899%22%20slang%3D%22en-US%22%3E%3CP%3EWhile%20recently%20working%20with%20a%20customer%E2%80%99s%20Governance%20Risk%20and%20Compliance%20team%20(GRC)%20the%20discussion%20pivoted%20to%20the%20ability%20to%20exempt%20Azure%20resources%20from%20policies%20or%20disable%20the%20policy%20to%20reflect%20the%20Secure%20Score%20correctly%20for%20their%20environment.%20GRC%20teams%20may%20want%20on%20a%20quarterly%20or%20monthly%20basis%20to%20produce%20a%20report%20of%20the%20exemptions%20to%20review%20and%20discuss%20or%20hand%20over%20to%20auditors%20looking%20to%20see%20the%20exemption%20story.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%26nbsp%3BExemption%20capabilities%20in%20Azure%20Security%20Center%20utilize%20Azure%20Policy%20exemptions%20that%20have%20been%20around%20for%20a%20bit%20now.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F16745%22%20target%3D%22_blank%22%3E%40Tom%20Janetscheck%3C%2FA%3E%26nbsp%3Bhas%20written%20quite%20a%20bit%20about%20the%20capability%20and%20provided%20some%20unique%20Workflow%20automations%20around%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-security-center%2Fresource-exemption-in-azure-security-center%2Fba-p%2F1703052%22%20target%3D%22_blank%22%3ESubmitting%20a%20exemption%20via%20Logic%20App%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-security-center%2Fhow-to-keep-track-of-resource-exemptions-in-azure-security%2Fba-p%2F1770580%22%20target%3D%22_blank%22%3ENotifying%20an%20Exemption%20via%20Logic%20App%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBoth%20are%20very%20great%20workflow%20automations%20the%20GRC%20team%20can%20adopt%20at%20an%20enterprise.%20Your%20GRC%20team%20may%20be%20looking%20for%20an%20easy%20to%20pull%20report%20they%20could%20download%20around%20the%20exemptions%20and%20the%20azure%20resources%20to%20quickly%20audit%20findings.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%E2%80%99s%20examine%20a%20few%20ways%20you%20can%20pull%20this%20information%20within%20the%20Azure%20Portal%2C%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FKusto%2FAzure%2520Resource%2520Graph%2FASC%2520exempt%2520and%2520disabled%2520recommendations%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Resource%20Graph%2C%3C%2FA%3E%20and%20use%20a%20new%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FPowershell%2520scripts%2FGenerate%2520exemption%2520report%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPowerShell%20Script%20to%20download%20a%20detailed%20report%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EAzure%20Portal%20%E2%80%93%20Policy%20-%20Assignments%20blade%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20you%20want%20a%20quick%20view%20of%20the%20exemptions%20for%20a%20particular%20subscription%20within%20the%20Azure%20Portal%20for%20Policy%20you%20can%20leverage%20the%20Assignments%20blade%20to%20list%20those%20exemptions.%20In%20addition%2C%20if%20you%20have%20written%20access%20you%20can%20update%20or%20create%20new%20exemptions%20as%20well.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithin%20the%20Azure%20Portal%20go%20to%20Policy%20and%20click%20on%20the%20Assignments%20blade%2C%20within%20there%2C%20click%20on%20%3CEM%3EASC%20Default%20assignment%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22policyui.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276302i3FA002170EC599C8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22policyui.png%22%20alt%3D%22policyui.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EClick%20on%20the%20%3CEM%3EExemptions%3C%2FEM%3E%20Tab%2C%20if%20you%20have%20write%20access%20to%20policy%20assignments%20you%20can%20also%20click%20on%20the%20%E2%80%A6%20and%20edit%20the%20exemption%20too%20see%20more%20details%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22exempsui.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276304iDFEC880104BCA493%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22exempsui.png%22%20alt%3D%22exempsui.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22editexmp.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276305i3EA241C89DE24601%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22editexmp.png%22%20alt%3D%22editexmp.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EAzure%20Resource%20Graph%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESome%20of%20the%20exemption%20values%20are%20stored%20as%20data%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fresource-graph%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Resource%20Graph%3C%2FA%3E%26nbsp%3Band%20specifically%20the%26nbsp%3B%3CEM%3Esecurityresources%26nbsp%3B%3C%2FEM%3Etable.%20If%20you%20are%20unfamiliar%20with%20the%20Azure%20Resource%20Graph%20the%20Azure%20Portal%E2%80%99s%20top%20search%20bar%20is%20also%20powered%20by%20it%20and%20helps%20return%20fast%20results.%20It%20is%20a%20great%20way%20to%26nbsp%3B%3CSTRONG%3Enot%3C%2FSTRONG%3E%26nbsp%3Binvoke%20a%20GET%20Azure%20Resource%20API%20call%20for%20each%20Azure%20resource%20details%20and%20configurations%20as%20their%20state%20and%20information%20are%20stored%20here.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22arg.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276306i136F3C376CB3ADB5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22arg.png%22%20alt%3D%22arg.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithin%20the%20table%20Azure%20does%20store%20some%20information%20around%20the%20ASC%20recommendations%20and%20their%20states%2C%20including%20the%20exemptions%20and%20policies%20disabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20now%20run%20a%20KQL%20query%20in%20Azure%20Resource%20Graph%20to%20generate%20a%20report.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3Esecurityresources%0A%20%20%20%20%20%20%20%20%7C%20where%20type%20%3D%3D%20%22microsoft.security%2Fassessments%22%0A%20%20%20%20%20%20%20%20%7C%20extend%20source%20%3D%20tostring(properties.resourceDetails.Source)%0A%20%20%20%20%20%20%20%20%7C%20extend%20resourceId%20%3D%0A%20%20%20%20%20%20%20%20%20%20%20%20trim(%22%20%22%2C%20tolower(tostring(case(source%20%3D~%20%22azure%22%2C%20properties.resourceDetails.Id%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20source%20%3D~%20%22aws%22%2C%20properties.resourceDetails.AzureResourceId%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20source%20%3D~%20%22gcp%22%2C%20properties.resourceDetails.AzureResourceId%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20extract(%22%5E(.%2B)%2Fproviders%2FMicrosoft.Security%2Fassessments%2F.%2B%24%22%2C1%2Cid)))))%0A%20%20%20%20%20%20%20%20%7C%20extend%20status%20%3D%20trim(%22%20%22%2C%20tostring(properties.status.code))%0A%20%20%20%20%20%20%20%20%7C%20extend%20cause%20%3D%20trim(%22%20%22%2C%20tostring(properties.status.cause))%0A%20%20%20%20%20%20%20%20%7C%20extend%20assessmentKey%20%3D%20tostring(name)%0A%20%20%20%20%20%20%20%20%7C%20where%20cause%20%3D%3D%20%22Exempt%22%20or%20cause%20%3D%3D%20%22OffByPolicy%22%0A%20%20%20%20%20%20%20%20%7C%20extend%20ResourceName%20%3D%20tostring(split(resourceId%2C'%2F')%5B8%5D)%2C%20RecommendationName%20%3D%20tostring(properties.displayName)%2C%20Source%20%3D%20properties.resourceDetails.Source%2C%20StatusCause%20%3D%20tostring(properties.status.cause)%2C%20StatusDescription%20%3D%20properties.status.description%2C%20RecommendationSeverity%20%3D%20tostring(properties.metadata.severity)%0A%20%20%20%20%20%20%20%20%7C%20project%20RecommendationName%2C%20RecommendationSeverity%2C%20ResourceName%2C%20StatusCause%2C%20StatusDescription%2C%20resourceGroup%2C%20Source%2C%20subscriptionId%0A%20%20%20%20%20%20%20%20%7C%20sort%20by%20RecommendationSeverity%2C%20RecommendationName%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20a%20comprehensive%20and%20better%20visual%20listing%20experience%2C%20be%20sure%20to%20set%20the%20query%20to%20run%20on%20all%20Azure%20Subscriptions%20and%20Formatted%20Results%20turned%20on.%20You%20can%20then%20download%20the%20report%20to%20a%20CSV%20file%20for%20the%20auditors%20or%20for%20review%20of%20the%20exceptions%20and%20disabled%20policies.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22arg.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276308i11B7BA186631A688%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22arg.png%22%20alt%3D%22arg.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20find%20the%20KQL%20query%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FKusto%2FAzure%2520Resource%2520Graph%2FASC%2520exempt%2520and%2520disabled%2520recommendations%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSTRONG%3Ehere%20in%20the%20Azure%20Security%20Center%20GitHub%20repo%3C%2FSTRONG%3E%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EGenerate-ExemptionReport.ps1%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20a%20more%20comprehensive%20and%20detailed%20report%20that%20includes%20Notes%20in%20the%20exemption%2C%20expiration%20dates%20for%20exemptions%2C%20and%20who%20created%20the%20exemptions%20you%20can%20now%20utilize%20the%20following%20PowerShell%20script%20which%20executes%20across%20Azure%20Subscriptions%20and%20invokes%20an%20API%20to%20get%20the%20details%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EMicrosoft.Authorization%2FpolicyExemptions%3Fapi-version%3D2020-07-01-preview%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20use%20the%20script%20you%20can%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FPowershell%2520scripts%2FGenerate%2520exemption%2520report%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Edownload%20here%20from%20the%20GitHub%20Repo%3C%2FA%3E%20and%20open%20PowerShell.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithin%20PowerShell%20be%20sure%20to%20log%20into%20an%20Azure%20using%20%3CEM%3EConnect-AzAccount%3C%2FEM%3E%20and%20using%20the%20login%20of%20someone%20who%20has%20a%20large%20amount%20of%20reader%20access%20across%20your%20Azure%20enterprises%20subscriptions.%20You%20may%20see%20some%20errors%20please%20ignore%20for%20now%20as%20the%20script%20will%20be%20tuned%20over%20time%20to%20support%20additional%20scenarios.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20end%20result%20is%20nicely%20generated%20CSV%20with%20all%20the%20details%20around%20the%20exemptions%20that%20can%20be%20imported%20into%20Excel%2C%20PowerBI%2C%20or%20other%20data%20visualization%20products.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20an%20example%20you%20can%20import%20into%20into%20Excel%2C%20Open%20a%20new%20Excel%20sheet%20and%20got%20to%20the%20%E2%80%98Data%E2%80%99%20tab%20and%20use%20the%20button%20%E2%80%98From%20Test%2FCSV%E2%80%99%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22excel.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276310i074DC65CB546B5E4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22excel.png%22%20alt%3D%22excel.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20imported%20you%20can%20pivot%20and%20filter%20as%20needed%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22report.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276311i06DCBF0D1230F28B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22report.png%22%20alt%3D%22report.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20article%20you%20explored%20several%20ways%20to%20examine%20and%20generate%20an%20exemption%20report.%20You%20can%20use%20the%20Azure%20Portal%20%E2%80%93%20Policy%20%E2%80%93%20Assignments%20blade%20to%20quickly%20view%20all%20the%20Exemptions.%20You%20can%20use%20the%20Azure%20Resource%20Graph%20and%20a%20KQL%20Query%20to%20generate%20a%20simplified%20exemption%20and%20policy%20disable%20report.%20Finally%20you%20can%20use%20a%20PowerShell%20script%20to%20generate%20a%20detailed%20exemption%20and%20policy%20disable%20report%20that%20includes%20notes%2C%20expiration%20date%20and%20time%2C%20and%20who%20created%20the%20exemption.%20These%20reports%20can%20be%20used%20in%20a%20quarterly%20or%20month%20basis%20for%20you%20GRC%20team%20to%20review%20and%20discuss%20or%20handed%20over%20to%20auditors%20looking%20to%20see%20the%20exemption%20story.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESpecial%20thanks%20to%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%40%3C%2FSTRONG%3E%3CEM%3E%3CSTRONG%3EYuri%20Diogenes%3C%2FSTRONG%3E%3C%2FEM%3E%3CEM%3E%20for%20reviewing%20this%20post%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2302899%22%20slang%3D%22en-US%22%3E%3CP%3EWhile%20recently%20working%20with%20a%20customer%E2%80%99s%20Governance%20Risk%20and%20Compliance%20team%20(GRC)%20the%20discussion%20pivoted%20to%20the%20ability%20to%20exempt%20Azure%20resources%20from%20policies%20or%20disable%20the%20policy%20to%20reflect%20the%20Secure%20Score%20correctly%20for%20their%20environment.%20GRC%20teams%20may%20want%20on%20a%20quarterly%20or%20monthly%20basis%20to%20produce%20a%20report%20of%20the%20exemptions%20to%20review%20and%20discuss%20or%20hand%20over%20to%20auditors%20looking%20to%20see%20the%20exemption%20story.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%E2%80%99s%20examine%20a%20few%20ways%20you%20can%20pull%20this%20information%20within%20the%20Azure%20Portal%2C%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FKusto%2FAzure%2520Resource%2520Graph%2FASC%2520exempt%2520and%2520disabled%2520recommendations%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3EAzure%20Resource%20Graph%3C%2FA%3E%20and%20use%20a%20new%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FPowershell%2520scripts%2FGenerate%2520exemption%2520report%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3EPowerShell%20Script%20to%20download%20a%20detailed%20report%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Apr 28 2021 09:19 AM
Updated by: