Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,46 @@
### Example 1: {{ Add title here }}
### Example 1: List all permission grant policies

```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant"
Get-MgPolicyPermissionGrantPolicy | fl

DeletedDateTime :
Description : Includes all application permissions (app roles), for all APIs, for any client application.
DisplayName : All application permissions, for any client app
Excludes : {}
Id : microsoft-all-application-permissions
Includes : {bddda1ec-0174-44d5-84e2-47fb0ac01595}
AdditionalProperties : {[includeAllPreApprovedApplications, False], [resourceScopeType, tenant], [includes@odata.context,
https://graph.microsoft.com/beta/$metadata#policies/permissionGrantPolicies('microsoft-all-application-permissions')/includes], [excludes@odata.context,
https://graph.microsoft.com/beta/$metadata#policies/permissionGrantPolicies('microsoft-all-application-permissions')/excludes]}

{{ Add output here }}
DeletedDateTime :
Description : Includes all chat resoruce-specific application permissions, for all APIs, for any client application.
DisplayName : All chat resource-specific application permissions, for any client app
Excludes : {}
Id : microsoft-all-application-permissions-for-chat
Includes : {013e8de3-5e79-4b0f-a440-8f7794086460}
AdditionalProperties : {[includeAllPreApprovedApplications, False], [resourceScopeType, chat], [includes@odata.context,
https://graph.microsoft.com/beta/$metadata#policies/permissionGrantPolicies('microsoft-all-application-permissions-for-chat')/includes], [excludes@odata.context,
https://graph.microsoft.com/beta/$metadata#policies/permissionGrantPolicies('microsoft-all-application-permissions-for-chat')/excludes]}
```

{{ Add description here }}
This command retrieves a list of all permission grant policies in Azure AD.

### Example 2: Get a permission grant policy by ID

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant"
Get-MgPolicyPermissionGrantPolicy -PermissionGrantPolicyId "microsoft-all-application-permissions" | fl

{{ Add output here }}
DeletedDateTime :
Description : Includes all application permissions (app roles), for all APIs, for any client application.
DisplayName : All application permissions, for any client app
Excludes : {}
Id : microsoft-all-application-permissions
Includes : {bddda1ec-0174-44d5-84e2-47fb0ac01595}
AdditionalProperties : {[@odata.context, https://graph.microsoft.com/beta/$metadata#policies/permissionGrantPolicies/$entity], [includeAllPreApprovedApplications, False], [resourceScopeType, tenant],
[includes@odata.context, https://graph.microsoft.com/beta/$metadata#policies/permissionGrantPolicies('microsoft-all-application-permissions')/includes]…}
```

{{ Add description here }}

This command retrieves a specified permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Get a permission grant policy exclude by ID

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant"
Get-MgPolicyPermissionGrantPolicyExclude -PermissionGrantPolicyId "microsoft-application-admin" | fl

{{ Add output here }}
```
CertifiedClientApplicationsOnly : False
ClientApplicationIds : {all}
ClientApplicationPublisherIds : {all}
ClientApplicationTenantIds : {all}
ClientApplicationsFromVerifiedPublisherOnly : False
Id : c85b029f-4abf-47d8-ae61-d2a38299033a
PermissionClassification : all
PermissionType : application
Permissions : {all}
ResourceApplication : 00000003-0000-0000-c000-000000000000
AdditionalProperties : {[scopeSensitivityLabels, System.Collections.Generic.Dictionary`2[System.String,System.Object]]}

{{ Add description here }}
CertifiedClientApplicationsOnly : False
ClientApplicationIds : {all}
ClientApplicationPublisherIds : {all}
ClientApplicationTenantIds : {all}
ClientApplicationsFromVerifiedPublisherOnly : False
Id : 2a1fbb36-9d9a-42d8-8804-de2aa45aca80
PermissionClassification : all
PermissionType : application
Permissions : {all}
ResourceApplication : 00000002-0000-0000-c000-000000000000
AdditionalProperties : {[scopeSensitivityLabels, System.Collections.Generic.Dictionary`2[System.String,System.Object]]}
```

This command retrieves a specified permission grant policy exclude configuration in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Get a permission grant policy include by ID

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant"
Get-MgPolicyPermissionGrantPolicyInclude -PermissionGrantPolicyId "microsoft-all-application-permissions" | fl

{{ Add output here }}
CertifiedClientApplicationsOnly : False
ClientApplicationIds : {all}
ClientApplicationPublisherIds : {all}
ClientApplicationTenantIds : {all}
ClientApplicationsFromVerifiedPublisherOnly : False
Id : bddda1ec-0174-44d5-84e2-47fb0ac01595
PermissionClassification : all
PermissionType : application
Permissions : {all}
ResourceApplication : any
AdditionalProperties : {[scopeSensitivityLabels, System.Collections.Generic.Dictionary`2[System.String,System.Object]]}
```

{{ Add description here }}

This command retrieves a specified permission grant policy include configuration in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Create a permission grant policy

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
New-MgPolicyPermissionGrantPolicy -Id "testtenant-sampleapp-permissions" -Description "Permissions for sample app in test tenant" -DisplayName "Sample app permissions" | fl

{{ Add output here }}
DeletedDateTime :
Description : Permissions for sample app in test tenant
DisplayName : Sample app permissions
Excludes :
Id : testtenant-sampleapp-permissions
Includes :
AdditionalProperties : {[@odata.context, https://graph.microsoft.com/v1.0/$metadata#policies/permissionGrantPolicies/$entity]}
```

{{ Add description here }}

This command creates a new permission grant policy in Azure AD. Specific include and exclude configurations can be created using the `New-MgPolicyPermissionGrantPolicyInclude` and `New-MgPolicyPermissionGrantPolicyExclude` cmdlets.
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Create a permission grant policy exclude

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
New-MgPolicyPermissionGrantPolicyExclude -PermissionGrantPolicyId "testtenant-sampleapp-permissions" -PermissionType "application" -ResourceApplication "00000000-0000-0000-0000-000000000000" -Permissions "00000000-0000-0000-0000-000000000000" | fl

{{ Add output here }}
ClientApplicationIds : {all}
ClientApplicationPublisherIds : {all}
ClientApplicationTenantIds : {all}
ClientApplicationsFromVerifiedPublisherOnly : False
Id : 66a94faf-9134-4f46-83d2-1aae2eaea98f
PermissionClassification : all
PermissionType : application
Permissions : {00000000-0000-0000-0000-000000000000}
ResourceApplication : 00000000-0000-0000-0000-000000000000
AdditionalProperties : {[@odata.context, https://graph.microsoft.com/v1.0/$metadata#policies/permissionGrantPolicies('testtenant-sampleapp-permissions')/excludes/$entity]}
```

{{ Add description here }}

This command creates a new permission grant policy exclude configuration for the specified permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Create a permission grant policy include

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
New-MgPolicyPermissionGrantPolicyInclude -PermissionGrantPolicyId "testtenant-sampleapp-permissions" -PermissionType "application" -ResourceApplication "00000000-0000-0000-0000-000000000000" -Permissions "00000000-0000-0000-0000-000000000000" | fl

{{ Add output here }}
ClientApplicationIds : {all}
ClientApplicationPublisherIds : {all}
ClientApplicationTenantIds : {all}
ClientApplicationsFromVerifiedPublisherOnly : False
Id : 084b9abc-cf56-4d84-bdb0-5ad8f3a51038
PermissionClassification : all
PermissionType : application
Permissions : {00000000-0000-0000-0000-000000000000}
ResourceApplication : 00000000-0000-0000-0000-000000000000
AdditionalProperties : {[@odata.context, https://graph.microsoft.com/v1.0/$metadata#policies/permissionGrantPolicies('testtenant-sampleapp-permissions')/includes/$entity]}
```

{{ Add description here }}

This command creates a new permission grant policy include configuration for the specified permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Remove a permission grant policy

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
Remove-MgPolicyPermissionGrantPolicy -PermissionGrantPolicyId "testtenant-sampleapp-permissions"
```

{{ Add description here }}

This command deletes the specified permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Remove a permission grant policy exclude

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
Remove-MgPolicyPermissionGrantPolicyExclude -PermissionGrantConditionSetId "60ba4fac-d39e-47b3-bd99-4394cb88a2f8" -PermissionGrantPolicyId "testtenant-sampleapp-permissions"
```

{{ Add description here }}

This command deletes the specified exclude configuration from the specific permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Remove a permission grant policy include

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
Remove-MgPolicyPermissionGrantPolicyInclude -PermissionGrantConditionSetId "084b9abc-cf56-4d84-bdb0-5ad8f3a51038" -PermissionGrantPolicyId "testtenant-sampleapp-permissions"
```

{{ Add description here }}

This command deletes the specified include configuration from the specific permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Update a permission grant policy

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
Update-MgPolicyPermissionGrantPolicy -PermissionGrantPolicyId "testtenant-sampleapp-permissions" -Description "Permissions for sample app in test tenant with new updates" -DisplayName "Sample app permissions with new updates"
```

{{ Add description here }}

This command replaces the existing values with the provided new values for the specified properties in the specified permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Update a permission grant policy exclude

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
Update-MgPolicyPermissionGrantPolicyExclude -PermissionGrantConditionSetId "33895130-8450-4a4b-a353-e2bc28d54f97" -PermissionGrantPolicyId "testtenant-sampleapp-permissions" -PermissionType "application" -ResourceApplication "00000000-0000-0000-0000-000000000000" -Permissions "00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"
```

{{ Add description here }}

This command replaces the existing values with the provided new values for the specified exclude configuration properties in the specified permission grant policy in Azure AD.
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
```
### Example 1: Update a permission grant policy include

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}

{{ Add output here }}
Connect-MgGraph -Scopes "Policy.Read.PermissionGrant,Policy.ReadWrite.PermissionGrant"
Update-MgPolicyPermissionGrantPolicyInclude -PermissionGrantConditionSetId "084b9abc-cf56-4d84-bdb0-5ad8f3a51038" -PermissionGrantPolicyId "testtenant-sampleapp-permissions" -PermissionType "application" -ResourceApplication "00000000-0000-0000-0000-000000000000" -Permissions "00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"
```

{{ Add description here }}

This command replaces the existing values with the provided new values for the specified include configuration properties in the specified permission grant policy in Azure AD.
Loading