Skip to content

Commit ab7c74f

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Updating examples
1 parent 65692b7 commit ab7c74f

File tree

723 files changed

+5286
-8961
lines changed

Some content is hidden

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

723 files changed

+5286
-8961
lines changed
Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
1-
### Example 1: Using the Add-MgBetaApplicationKey Cmdlet
1+
### Example 1: Add a new key credential to an application
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Applications
6+
47
$params = @{
5-
KeyCredential = @{
6-
Type = "AsymmetricX509Cert"
7-
Usage = "Verify"
8-
Key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
8+
keyCredential = @{
9+
type = "AsymmetricX509Cert"
10+
usage = "Verify"
11+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
912
}
10-
PasswordCredential = $null
11-
Proof = "eyJ0eXAiOiJ..."
13+
passwordCredential = $null
14+
proof = "eyJ0eXAiOiJ..."
1215
}
16+
1317
Add-MgBetaApplicationKey -ApplicationId $applicationId -BodyParameter $params
18+
1419
```
15-
This example shows how to use the Add-MgBetaApplicationKey Cmdlet.
16-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
17-
### Example 2: Using the Add-MgBetaApplicationKey Cmdlet
20+
This example will add a new key credential to an application
21+
22+
### Example 2: Add a key credential and an associated password for the key
23+
1824
```powershell
25+
1926
Import-Module Microsoft.Graph.Beta.Applications
27+
2028
$params = @{
21-
KeyCredential = @{
22-
Type = "X509CertAndPassword"
23-
Usage = "Sign"
24-
Key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
29+
keyCredential = @{
30+
type = "X509CertAndPassword"
31+
usage = "Sign"
32+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
2533
}
26-
PasswordCredential = @{
27-
SecretText = "MKTr0w1..."
34+
passwordCredential = @{
35+
secretText = "MKTr0w1..."
2836
}
29-
Proof = "eyJ0eXAiOiJ..."
37+
proof = "eyJ0eXAiOiJ..."
3038
}
39+
3140
Add-MgBetaApplicationKey -ApplicationId $applicationId -BodyParameter $params
41+
3242
```
33-
This example shows how to use the Add-MgBetaApplicationKey Cmdlet.
34-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
43+
This example will add a key credential and an associated password for the key
44+
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
### Example 1: Using the Clear-MgBetaApplicationVerifiedPublisher Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Applications
6+
47
Clear-MgBetaApplicationVerifiedPublisher -ApplicationId $applicationId
8+
59
```
610
This example shows how to use the Clear-MgBetaApplicationVerifiedPublisher Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +0,0 @@
1-
### Example 1: Check group memberships for a directory object
2-
3-
```powershell
4-
Import-Module Microsoft.Graph.Beta.DirectoryObjects
5-
6-
$params = @{
7-
GroupIds = @(
8-
"f448435d-3ca7-4073-8152-a1fd73c0fd09"
9-
"bd7c6263-4dd5-4ae8-8c96-556e1c0bece6"
10-
"93670da6-d731-4366-94b5-abed40b6016b"
11-
"f5484ab1-4d4d-41ec-a9b8-754b3957bfc7"
12-
"c9103f26-f3cf-4004-a611-2a14e81b8f79"
13-
)
14-
}
15-
16-
Confirm-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
17-
```
18-
This example shows how to use the Confirm-MgBetaApplicationMemberGroup Cmdlet.
19-
20-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
21-
22-
### Example 2: Check group memberships for the signed-in user
23-
24-
```powershell
25-
Import-Module Microsoft.Graph.Beta.Users.Actions
26-
27-
$params = @{
28-
GroupIds = @(
29-
"fee2c45b-915a-4a64b130f4eb9e75525e"
30-
"4fe90ae065a-478b9400e0a0e1cbd540"
31-
)
32-
}
33-
34-
# A UPN can also be used as -UserId.
35-
Confirm-MgBetaUserMemberGroup -UserId $userId -BodyParameter $params
36-
```
37-
This example shows how to use the Confirm-MgBetaApplicationMemberGroup Cmdlet.
38-
39-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
40-
Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +0,0 @@
1-
### Example 1: Check group memberships for a directory object
2-
3-
```powershell
4-
Import-Module Microsoft.Graph.Beta.DirectoryObjects
5-
6-
$params = @{
7-
GroupIds = @(
8-
"f448435d-3ca7-4073-8152-a1fd73c0fd09"
9-
"bd7c6263-4dd5-4ae8-8c96-556e1c0bece6"
10-
"93670da6-d731-4366-94b5-abed40b6016b"
11-
"f5484ab1-4d4d-41ec-a9b8-754b3957bfc7"
12-
"c9103f26-f3cf-4004-a611-2a14e81b8f79"
13-
)
14-
}
15-
16-
Confirm-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
17-
```
18-
This example shows how to use the Confirm-MgBetaServicePrincipalMemberGroup Cmdlet.
19-
20-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
21-
22-
### Example 2: Check group memberships for the signed-in user
23-
24-
```powershell
25-
Import-Module Microsoft.Graph.Beta.Users.Actions
26-
27-
$params = @{
28-
GroupIds = @(
29-
"fee2c45b-915a-4a64b130f4eb9e75525e"
30-
"4fe90ae065a-478b9400e0a0e1cbd540"
31-
)
32-
}
33-
34-
# A UPN can also be used as -UserId.
35-
Confirm-MgBetaUserMemberGroup -UserId $userId -BodyParameter $params
36-
```
37-
This example shows how to use the Confirm-MgBetaServicePrincipalMemberGroup Cmdlet.
38-
39-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
40-
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +0,0 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
4-
5-
{{ Add output here }}
6-
```
7-
8-
{{ Add description here }}
9-
10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
13-
14-
{{ Add output here }}
15-
```
16-
17-
{{ Add description here }}
18-
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +0,0 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
4-
5-
{{ Add output here }}
6-
```
7-
8-
{{ Add description here }}
9-
10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
13-
14-
{{ Add output here }}
15-
```
16-
17-
{{ Add description here }}
18-
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
### Example 1: Using the Find-MgBetaServicePrincipalSynchronizationJobSchemaDirectory Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Applications
6+
47
Find-MgBetaServicePrincipalSynchronizationJobSchemaDirectory -ServicePrincipalId $servicePrincipalId -SynchronizationJobId $synchronizationJobId -DirectoryDefinitionId $directoryDefinitionId
8+
59
```
610
This example shows how to use the Find-MgBetaServicePrincipalSynchronizationJobSchemaDirectory Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +0,0 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
4-
5-
{{ Add output here }}
6-
```
7-
8-
{{ Add description here }}
9-
10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
13-
14-
{{ Add output here }}
15-
```
16-
17-
{{ Add description here }}
18-
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +0,0 @@
1-
### Example 1: Code snippet
2-
3-
```powershell
4-
Import-Module Microsoft.Graph.Beta.DirectoryObjects
5-
6-
$params = @{
7-
Ids = @(
8-
"84b80893-8749-40a3-97b7-68513b600544"
9-
"5d6059b6-368d-45f8-91e1-8e07d485f1d0"
10-
"0b944de3-e0fc-4774-a49a-b135213725ef"
11-
"b75a5ab2-fe55-4463-bd31-d21ad555c6e0"
12-
)
13-
Types = @(
14-
"user"
15-
"group"
16-
"device"
17-
)
18-
}
19-
20-
Get-MgBetaDirectoryObjectById -BodyParameter $params
21-
```
22-
This example shows how to use the Get-MgBetaApplicationById Cmdlet.
23-
24-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
25-

src/Applications/beta/examples/Get-MgBetaApplicationExtensionProperty.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
### Example 1: Code snippet
1+
### Example 1: Code snippet
22

3-
```powershellImport-Module Microsoft.Graph.Beta.Applications
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Applications
6+
7+
Get-MgBetaApplicationExtensionProperty -ApplicationId $applicationId
8+
9+
```
10+
This example shows how to use the Get-MgBetaApplicationExtensionProperty Cmdlet.
411

5-
Get-MgBetaApplicationExtensionProperty -ApplicationId $applicationId -ExtensionPropertyId $extensionPropertyId
6-
```
7-
This example shows how to use the Get-MgBetaApplicationExtensionProperty Cmdlet.
8-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
9-

0 commit comments

Comments
 (0)