Skip to content

Commit 2b2a98f

Browse files
authored
Merge pull request #2934 from microsoftgraph/WeeklyExamplesUpdate/202408300312
[v2] Examples Update
2 parents 1e8df60 + 9b572e4 commit 2b2a98f

File tree

376 files changed

+4622
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+4622
-688
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Applications
6+
7+
Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example will### example
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Get-MgServicePrincipalRemoteDesktopSecurityConfiguration -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example shows how to use the Get-MgServicePrincipalRemoteDesktopSecurityConfiguration Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Get-MgServicePrincipalRemoteDesktopSecurityConfigurationTargetDeviceGroup -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example shows how to use the Get-MgServicePrincipalRemoteDesktopSecurityConfigurationTargetDeviceGroup Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Get-MgServicePrincipalSynchronizationJob -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example shows how to use the Get-MgServicePrincipalSynchronizationJob Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Get-MgServicePrincipalSynchronizationJobSchema -ServicePrincipalId $servicePrincipalId -SynchronizationJobId $synchronizationJobId
8+
9+
```
10+
This example shows how to use the Get-MgServicePrincipalSynchronizationJobSchema Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Get-MgServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example will### example
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
$params = @{
8+
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/appManagementPolicies/{id}"
9+
}
10+
11+
New-MgApplicationAppManagementPolicyByRef -ApplicationId $applicationId -BodyParameter $params
12+
13+
```
14+
This example shows how to use the New-MgApplicationAppManagementPolicyByRef Cmdlet.
15+
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
78
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/tokenIssuancePolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
89
}
910
1011
New-MgApplicationTokenIssuancePolicyByRef -ApplicationId $applicationId -BodyParameter $params
12+
1113
```
1214
This example shows how to use the New-MgApplicationTokenIssuancePolicyByRef Cmdlet.
1315

14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
15-
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
78
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/tokenLifetimePolicies/4d2f137b-e8a9-46da-a5c3-cc85b2b840a4"
89
}
910
1011
New-MgApplicationTokenLifetimePolicyByRef -ApplicationId $applicationId -BodyParameter $params
12+
1113
```
1214
This example shows how to use the New-MgApplicationTokenLifetimePolicyByRef Cmdlet.
1315

14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
15-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
@@ -10,8 +11,7 @@ $params = @{
1011
}
1112
1213
New-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $servicePrincipalId -BodyParameter $params
14+
1315
```
1416
This example shows how to use the New-MgServicePrincipalAppRoleAssignedTo Cmdlet.
1517

16-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
17-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
@@ -10,8 +11,7 @@ $params = @{
1011
}
1112
1213
New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $servicePrincipalId -BodyParameter $params
14+
1315
```
1416
This example shows how to use the New-MgServicePrincipalAppRoleAssignment Cmdlet.
1517

16-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
17-
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
78
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/claimsMappingPolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
89
}
910
1011
New-MgServicePrincipalClaimMappingPolicyByRef -ServicePrincipalId $servicePrincipalId -BodyParameter $params
12+
1113
```
1214
This example shows how to use the New-MgServicePrincipalClaimMappingPolicyByRef Cmdlet.
1315

14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
15-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
@@ -10,8 +11,7 @@ $params = @{
1011
}
1112
1213
New-MgServicePrincipalDelegatedPermissionClassification -ServicePrincipalId $servicePrincipalId -BodyParameter $params
14+
1315
```
1416
This example shows how to use the New-MgServicePrincipalDelegatedPermissionClassification Cmdlet.
1517

16-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
17-
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
$params = @{
78
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/homeRealmDiscoveryPolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
89
}
910
1011
New-MgServicePrincipalHomeRealmDiscoveryPolicyByRef -ServicePrincipalId $servicePrincipalId -BodyParameter $params
12+
1113
```
1214
This example shows how to use the New-MgServicePrincipalHomeRealmDiscoveryPolicyByRef Cmdlet.
1315

14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
15-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
$params = @{
8+
"@odata.type" = "#microsoft.graph.targetDeviceGroup"
9+
id = "b9e4eae4-b781-45a1-ce65-f2dd8ac3b696"
10+
displayName = "Device Group A"
11+
}
12+
13+
New-MgServicePrincipalRemoteDesktopSecurityConfigurationTargetDeviceGroup -ServicePrincipalId $servicePrincipalId -BodyParameter $params
14+
15+
```
16+
This example shows how to use the New-MgServicePrincipalRemoteDesktopSecurityConfigurationTargetDeviceGroup Cmdlet.
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
$params = @{
8+
templateId = "BoxOutDelta"
9+
}
10+
11+
New-MgServicePrincipalSynchronizationJob -ServicePrincipalId $servicePrincipalId -BodyParameter $params
12+
13+
```
14+
This example shows how to use the New-MgServicePrincipalSynchronizationJob Cmdlet.
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Remove-MgApplicationAppManagementPolicyAppManagementPolicyByRef -ApplicationId $applicationId -AppManagementPolicyId $appManagementPolicyId
8+
9+
```
10+
This example shows how to use the Remove-MgApplicationAppManagementPolicyAppManagementPolicyByRef Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
Remove-MgApplicationExtensionProperty -ApplicationId $applicationId -ExtensionPropertyId $extensionPropertyId
8+
79
```
810
This example shows how to use the Remove-MgApplicationExtensionProperty Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
Remove-MgApplicationFederatedIdentityCredential -ApplicationId $applicationId -FederatedIdentityCredentialId $federatedIdentityCredentialId
8+
79
```
810
This example shows how to use the Remove-MgApplicationFederatedIdentityCredential Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Remove-MgApplicationOwnerDirectoryObjectByRef -ApplicationId $applicationId -DirectoryObjectId $directoryObjectId
8+
9+
```
10+
This example shows how to use the Remove-MgApplicationOwnerDirectoryObjectByRef Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Remove-MgApplicationTokenIssuancePolicyTokenIssuancePolicyByRef -ApplicationId $applicationId -TokenIssuancePolicyId $tokenIssuancePolicyId
8+
9+
```
10+
This example shows how to use the Remove-MgApplicationTokenIssuancePolicyTokenIssuancePolicyByRef Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Remove-MgApplicationTokenLifetimePolicyTokenLifetimePolicyByRef -ApplicationId $applicationId -TokenLifetimePolicyId $tokenLifetimePolicyId
8+
9+
```
10+
This example shows how to use the Remove-MgApplicationTokenLifetimePolicyTokenLifetimePolicyByRef Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
Remove-MgGroupAppRoleAssignment -GroupId $groupId -AppRoleAssignmentId $appRoleAssignmentId
8+
79
```
810
This example shows how to use the Remove-MgGroupAppRoleAssignment Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
Remove-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $servicePrincipalId -AppRoleAssignmentId $appRoleAssignmentId
8+
79
```
810
This example shows how to use the Remove-MgServicePrincipalAppRoleAssignedTo Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Remove-MgServicePrincipalClaimMappingPolicyClaimMappingPolicyByRef -ServicePrincipalId $servicePrincipalId -ClaimsMappingPolicyId $claimsMappingPolicyId
8+
9+
```
10+
This example shows how to use the Remove-MgServicePrincipalClaimMappingPolicyClaimMappingPolicyByRef Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Applications
56
67
Remove-MgServicePrincipalDelegatedPermissionClassification -ServicePrincipalId $servicePrincipalId -DelegatedPermissionClassificationId $delegatedPermissionClassificationId
8+
79
```
810
This example shows how to use the Remove-MgServicePrincipalDelegatedPermissionClassification Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Remove-MgServicePrincipalHomeRealmDiscoveryPolicyHomeRealmDiscoveryPolicyByRef -ServicePrincipalId $servicePrincipalId -HomeRealmDiscoveryPolicyId $homeRealmDiscoveryPolicyId
8+
9+
```
10+
This example shows how to use the Remove-MgServicePrincipalHomeRealmDiscoveryPolicyHomeRealmDiscoveryPolicyByRef Cmdlet.
11+

0 commit comments

Comments
 (0)