|
1 | 1 | ---
|
2 | 2 | ms.service: azure-policy
|
3 | 3 | ms.topic: include
|
4 |
| -ms.date: 02/25/2025 |
| 4 | +ms.date: 03/19/2025 |
5 | 5 | author: davidsmatlak
|
6 | 6 | ms.author: davidsmatlak
|
7 | 7 | ---
|
@@ -43,33 +43,33 @@ Search-AzGraph -Query "policyresources | where type == 'microsoft.authorization/
|
43 | 43 |
|
44 | 44 | ### Policy exemptions that expire within 90 days
|
45 | 45 |
|
46 |
| -Lists the name and expiration date. |
| 46 | +Lists the name (exemption ID), display name, and expiration date. |
47 | 47 |
|
48 | 48 | ```kusto
|
49 | 49 | PolicyResources
|
50 | 50 | | where type == 'microsoft.authorization/policyexemptions'
|
51 | 51 | | extend expiresOnC = todatetime(properties.expiresOn)
|
52 | 52 | | where isnotnull(expiresOnC)
|
53 | 53 | | where expiresOnC >= now() and expiresOnC < now(+90d)
|
54 |
| -| project name, expiresOnC |
| 54 | +| project name, properties.displayName, expiresOnC |
55 | 55 | ```
|
56 | 56 |
|
57 | 57 | # [Azure CLI](#tab/azure-cli)
|
58 | 58 |
|
59 | 59 | ```azurecli-interactive
|
60 |
| -az graph query -q "policyresources | where type == 'microsoft.authorization/policyexemptions' | extend expiresOnC = todatetime(properties.expiresOn) | where isnotnull(expiresOnC) | where expiresOnC >= now() and expiresOnC < now(+90d) | project name, expiresOnC" |
| 60 | +az graph query -q "PolicyResources | where type == 'microsoft.authorization/policyexemptions' | extend expiresOnC = todatetime(properties.expiresOn) | where isnotnull(expiresOnC) | where expiresOnC >= now() and expiresOnC < now(+90d) | project name, properties.displayName, expiresOnC" |
61 | 61 | ```
|
62 | 62 |
|
63 | 63 | # [Azure PowerShell](#tab/azure-powershell)
|
64 | 64 |
|
65 | 65 | ```azurepowershell-interactive
|
66 |
| -Search-AzGraph -Query "policyresources | where type == 'microsoft.authorization/policyexemptions' | extend expiresOnC = todatetime(properties.expiresOn) | where isnotnull(expiresOnC) | where expiresOnC >= now() and expiresOnC < now(+90d) | project name, expiresOnC" |
| 66 | +Search-AzGraph -Query "PolicyResources | where type == 'microsoft.authorization/policyexemptions' | extend expiresOnC = todatetime(properties.expiresOn) | where isnotnull(expiresOnC) | where expiresOnC >= now() and expiresOnC < now(+90d) | project name, properties.displayName, expiresOnC" |
67 | 67 | ```
|
68 | 68 |
|
69 | 69 | # [Portal](#tab/azure-portal)
|
70 | 70 |
|
71 |
| -- Azure portal: <a href="https://portal.azure.com/#blade/HubsExtension/ArgQueryBlade/query/policyresources%0D%0A%7C%20where%20type%20%3D%3D%20%27microsoft.authorization%2Fpolicyexemptions%27%0D%0A%7C%20extend%20expiresOnC%20%3D%20todatetime%28properties.expiresOn%29%0D%0A%7C%20where%20isnotnull%28expiresOnC%29%0D%0A%7C%20where%20expiresOnC%20%3E%3D%20now%28%29%20and%20expiresOnC%20%3C%20now%28%2B90d%29%0D%0A%7C%20project%20name%2C%20expiresOnC" target="_blank">portal.azure.com</a> |
72 |
| -- Azure Government portal: <a href="https://portal.azure.us/#blade/HubsExtension/ArgQueryBlade/query/policyresources%0D%0A%7C%20where%20type%20%3D%3D%20%27microsoft.authorization%2Fpolicyexemptions%27%0D%0A%7C%20extend%20expiresOnC%20%3D%20todatetime%28properties.expiresOn%29%0D%0A%7C%20where%20isnotnull%28expiresOnC%29%0D%0A%7C%20where%20expiresOnC%20%3E%3D%20now%28%29%20and%20expiresOnC%20%3C%20now%28%2B90d%29%0D%0A%7C%20project%20name%2C%20expiresOnC" target="_blank">portal.azure.us</a> |
73 |
| -- Microsoft Azure operated by 21Vianet portal: <a href="https://portal.azure.cn/#blade/HubsExtension/ArgQueryBlade/query/policyresources%0D%0A%7C%20where%20type%20%3D%3D%20%27microsoft.authorization%2Fpolicyexemptions%27%0D%0A%7C%20extend%20expiresOnC%20%3D%20todatetime%28properties.expiresOn%29%0D%0A%7C%20where%20isnotnull%28expiresOnC%29%0D%0A%7C%20where%20expiresOnC%20%3E%3D%20now%28%29%20and%20expiresOnC%20%3C%20now%28%2B90d%29%0D%0A%7C%20project%20name%2C%20expiresOnC" target="_blank">portal.azure.cn</a> |
| 71 | +- Azure portal: <a href="https://portal.azure.com/#blade/HubsExtension/ArgQueryBlade/query/PolicyResources%0D%0A%7C%20where%20type%20%3D%3D%20%27microsoft.authorization%2Fpolicyexemptions%27%0D%0A%7C%20extend%20expiresOnC%20%3D%20todatetime%28properties.expiresOn%29%0D%0A%7C%20where%20isnotnull%28expiresOnC%29%0D%0A%7C%20where%20expiresOnC%20%3E%3D%20now%28%29%20and%20expiresOnC%20%3C%20now%28%2B90d%29%0D%0A%7C%20project%20name%2C%20properties.displayName%2C%20expiresOnC" target="_blank">portal.azure.com</a> |
| 72 | +- Azure Government portal: <a href="https://portal.azure.us/#blade/HubsExtension/ArgQueryBlade/query/PolicyResources%0D%0A%7C%20where%20type%20%3D%3D%20%27microsoft.authorization%2Fpolicyexemptions%27%0D%0A%7C%20extend%20expiresOnC%20%3D%20todatetime%28properties.expiresOn%29%0D%0A%7C%20where%20isnotnull%28expiresOnC%29%0D%0A%7C%20where%20expiresOnC%20%3E%3D%20now%28%29%20and%20expiresOnC%20%3C%20now%28%2B90d%29%0D%0A%7C%20project%20name%2C%20properties.displayName%2C%20expiresOnC" target="_blank">portal.azure.us</a> |
| 73 | +- Microsoft Azure operated by 21Vianet portal: <a href="https://portal.azure.cn/#blade/HubsExtension/ArgQueryBlade/query/PolicyResources%0D%0A%7C%20where%20type%20%3D%3D%20%27microsoft.authorization%2Fpolicyexemptions%27%0D%0A%7C%20extend%20expiresOnC%20%3D%20todatetime%28properties.expiresOn%29%0D%0A%7C%20where%20isnotnull%28expiresOnC%29%0D%0A%7C%20where%20expiresOnC%20%3E%3D%20now%28%29%20and%20expiresOnC%20%3C%20now%28%2B90d%29%0D%0A%7C%20project%20name%2C%20properties.displayName%2C%20expiresOnC" target="_blank">portal.azure.cn</a> |
74 | 74 |
|
75 | 75 | ---
|
0 commit comments