Skip to content

Commit 68bd693

Browse files
committed
updates 90 day exemption query
1 parent c36a199 commit 68bd693

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

articles/governance/includes/policy/policy-resources-exemption-query.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
ms.service: azure-policy
33
ms.topic: include
4-
ms.date: 02/25/2025
4+
ms.date: 03/19/2025
55
author: davidsmatlak
66
ms.author: davidsmatlak
77
---
@@ -43,33 +43,33 @@ Search-AzGraph -Query "policyresources | where type == 'microsoft.authorization/
4343

4444
### Policy exemptions that expire within 90 days
4545

46-
Lists the name and expiration date.
46+
Lists the name (exemption ID), display name, and expiration date.
4747

4848
```kusto
4949
PolicyResources
5050
| where type == 'microsoft.authorization/policyexemptions'
5151
| extend expiresOnC = todatetime(properties.expiresOn)
5252
| where isnotnull(expiresOnC)
5353
| where expiresOnC >= now() and expiresOnC < now(+90d)
54-
| project name, expiresOnC
54+
| project name, properties.displayName, expiresOnC
5555
```
5656

5757
# [Azure CLI](#tab/azure-cli)
5858

5959
```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"
6161
```
6262

6363
# [Azure PowerShell](#tab/azure-powershell)
6464

6565
```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"
6767
```
6868

6969
# [Portal](#tab/azure-portal)
7070

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>
7474

7575
---

articles/governance/policy/samples/resource-graph-samples.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure Resource Graph sample queries for Azure Policy
33
description: Sample Azure Resource Graph queries for Azure Policy showing use of resource types and tables to access Azure Policy related resources and properties.
4-
ms.date: 02/25/2025
4+
ms.date: 03/19/2025
55
ms.topic: sample
66
ms.custom: devx-track-azurecli, devx-track-azurepowershell
77
---
@@ -19,14 +19,6 @@ for Azure Policy.
1919

2020
[!INCLUDE [policy-resources-exemption-query](../../includes/policy/policy-resources-exemption-query.md)]
2121

22-
<!--
23-
## Azure Policy Guest Configuration
24-
25-
[!INCLUDE [azure-resource-graph-samples-cat-policy-gc](../../includes/policy/azure-policy-guest-configuration.md)]
26-
27-
-->
28-
29-
3022
## Next steps
3123

3224
- Learn more about the [query language](../../resource-graph/concepts/query-language.md).

0 commit comments

Comments
 (0)