Skip to content

Commit 688a0e8

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Repaired examples and descriptions
1 parent 8cfa077 commit 688a0e8

File tree

11,730 files changed

+43982
-105391
lines changed

Some content is hidden

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

11,730 files changed

+43982
-105391
lines changed

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgApplicationKey.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,34 +68,38 @@ You can use the Update application operation to perform an update instead.
6868
| Application | Application.ReadWrite.OwnedBy, Directory.ReadWrite.All, Application.ReadWrite.All, |
6969

7070
## EXAMPLES
71+
### Example 1: Add a new key credential to an application
72+
73+
```powershell
7174
72-
### EXAMPLE 1
73-
```
7475
Import-Module Microsoft.Graph.Applications
75-
```
7676
7777
$params = @{
7878
keyCredential = @{
7979
type = "AsymmetricX509Cert"
8080
usage = "Verify"
81-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
81+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
8282
}
8383
passwordCredential = $null
8484
proof = "eyJ0eXAiOiJ..."
8585
}
8686
8787
Add-MgApplicationKey -ApplicationId $applicationId -BodyParameter $params
8888
89-
### EXAMPLE 2
9089
```
90+
This example will add a new key credential to an application
91+
92+
### Example 2: Add a key credential and an associated password for the key
93+
94+
```powershell
95+
9196
Import-Module Microsoft.Graph.Applications
92-
```
9397
9498
$params = @{
9599
keyCredential = @{
96100
type = "X509CertAndPassword"
97101
usage = "Sign"
98-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
102+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
99103
}
100104
passwordCredential = @{
101105
secretText = "MKTr0w1..."
@@ -105,6 +109,10 @@ $params = @{
105109
106110
Add-MgApplicationKey -ApplicationId $applicationId -BodyParameter $params
107111
112+
```
113+
This example will add a key credential and an associated password for the key
114+
115+
108116
## PARAMETERS
109117

110118
### -AdditionalProperties

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgApplicationPassword.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ You can also add passwords while creating the application.
6060
| Application | Application.ReadWrite.OwnedBy, Directory.ReadWrite.All, Application.ReadWrite.All, |
6161

6262
## EXAMPLES
63+
### Example 1: Add a password credential to an application with a six month expiry
64+
65+
```powershell
6366
64-
### EXAMPLE 1
65-
```
6667
Connect-MgGraph -Scopes 'Application.ReadWrite.All'
67-
```
6868
6969
$appObjectId = 'eaf1e531-0d58-4874-babe-b9a9f436e6c3'
7070
@@ -83,13 +83,17 @@ Hint : Q_e
8383
KeyId : c82bb763-741b-4575-9d9d-df7e766f6999
8484
SecretText : Q_e8Q~ZDWJD.bkgajbREp-VFFUayCuEk8b1hDcr9
8585
StartDateTime : 26/5/2022 1:03:31 pm
86-
AdditionalProperties : {\[@odata.context,
87-
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential\]}
88-
89-
### EXAMPLE 2
86+
AdditionalProperties : {[@odata.context,
87+
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential]}
9088
```
89+
90+
Add a password to an application that expires in six months from the current date.
91+
92+
### Example 2: Add a password credential to an application with a start date
93+
94+
```powershell
95+
9196
Connect-MgGraph -Scopes 'Application.ReadWrite.All'
92-
```
9397
9498
$appObjectId = 'eaf1e531-0d58-4874-babe-b9a9f436e6c3'
9599
@@ -112,8 +116,13 @@ Hint : TiA
112116
KeyId : 082bf20f-63d6-4970-bb4e-55e504f50d8b
113117
SecretText : TiA8Q~Zs7ej1cGtlW0qnmuFi~JlxXTZew_tU1bGA
114118
StartDateTime : 26/5/2022 2:00:00 pm
115-
AdditionalProperties : {\[@odata.context,
116-
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential\]}
119+
AdditionalProperties : {[@odata.context,
120+
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential]}
121+
```
122+
123+
Add a password to an application that becomes valid at 12:00 am the next day and is valid for six months.
124+
125+
Use `$secret.StartDateTime.ToLocalTime()` to convert the returned dates from UTC to the local timezone.
117126

118127
## PARAMETERS
119128

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalKey.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,34 +65,38 @@ Update servicePrincipal can be used to perform an update instead.
6565
| Application | Application.ReadWrite.OwnedBy, Directory.ReadWrite.All, Application.ReadWrite.All, |
6666

6767
## EXAMPLES
68+
### Example 1: Adding a new key credential to a servicePrincipal
69+
70+
```powershell
6871
69-
### EXAMPLE 1
70-
```
7172
Import-Module Microsoft.Graph.Applications
72-
```
7373
7474
$params = @{
7575
keyCredential = @{
7676
type = "AsymmetricX509Cert"
7777
usage = "Verify"
78-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
78+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
7979
}
8080
passwordCredential = $null
8181
proof = "eyJ0eXAiOiJ..."
8282
}
8383
8484
Add-MgServicePrincipalKey -ServicePrincipalId $servicePrincipalId -BodyParameter $params
8585
86-
### EXAMPLE 2
8786
```
87+
This example shows adding a new key credential to a serviceprincipal
88+
89+
### Example 2: Adding a key credential and an associated password for the key
90+
91+
```powershell
92+
8893
Import-Module Microsoft.Graph.Applications
89-
```
9094
9195
$params = @{
9296
keyCredential = @{
9397
type = "X509CertAndPassword"
9498
usage = "Sign"
95-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
99+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
96100
}
97101
passwordCredential = @{
98102
secretText = "MKTr0w1..."
@@ -102,6 +106,10 @@ $params = @{
102106
103107
Add-MgServicePrincipalKey -ServicePrincipalId $servicePrincipalId -BodyParameter $params
104108
109+
```
110+
This example shows adding a key credential and an associated password for the key
111+
112+
105113
## PARAMETERS
106114

107115
### -AdditionalProperties

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalPassword.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ Add a strong password or secret to a servicePrincipal object.
5555
| Application | Application.ReadWrite.OwnedBy, Directory.ReadWrite.All, Application.ReadWrite.All, |
5656

5757
## EXAMPLES
58+
### Example 1: Code snippet
59+
60+
```powershell
5861
59-
### EXAMPLE 1
60-
```
6162
Import-Module Microsoft.Graph.Applications
62-
```
6363
6464
$params = @{
6565
passwordCredential = @{
@@ -69,6 +69,10 @@ $params = @{
6969
7070
Add-MgServicePrincipalPassword -ServicePrincipalId $servicePrincipalId -BodyParameter $params
7171
72+
```
73+
This example shows how to use the Add-MgServicePrincipalPassword Cmdlet.
74+
75+
7276
## PARAMETERS
7377

7478
### -AdditionalProperties

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalTokenSigningCertificate.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,23 @@ The endDateTime can be up to three years after the certificate is created.
7373
| Application | Application.ReadWrite.OwnedBy, Directory.ReadWrite.All, Application.ReadWrite.All, |
7474

7575
## EXAMPLES
76+
### Example 1: Code snippet
77+
78+
```powershell
7679
77-
### EXAMPLE 1
78-
```
7980
Import-Module Microsoft.Graph.Applications
80-
```
8181
8282
$params = @{
8383
displayName = "CN=customDisplayName"
84-
endDateTime = \[System.DateTime\]::Parse("2024-01-25T00:00:00Z")
84+
endDateTime = [System.DateTime]::Parse("2024-01-25T00:00:00Z")
8585
}
8686
8787
Add-MgServicePrincipalTokenSigningCertificate -ServicePrincipalId $servicePrincipalId -BodyParameter $params
8888
89+
```
90+
This example shows how to use the Add-MgServicePrincipalTokenSigningCertificate Cmdlet.
91+
92+
8993
## PARAMETERS
9094

9195
### -AdditionalProperties

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Clear-MgApplicationVerifiedPublisher.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,18 @@ Unset the verifiedPublisher previously set on an application, removing all verif
3636
For more information, see Publisher verification.
3737

3838
## EXAMPLES
39+
### Example 1: Code snippet
40+
41+
```powershell
3942
40-
### EXAMPLE 1
41-
```
4243
Import-Module Microsoft.Graph.Applications
43-
```
4444
4545
Clear-MgApplicationVerifiedPublisher -ApplicationId $applicationId
4646
47+
```
48+
This example shows how to use the Clear-MgApplicationVerifiedPublisher Cmdlet.
49+
50+
4751
## PARAMETERS
4852

4953
### -ApplicationId

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Confirm-MgApplicationMemberGroup.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,6 @@ You can check up to a maximum of 20 groups per request.
5757
This function supports all groups provisioned in Microsoft Entra ID.
5858
Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct.
5959

60-
## EXAMPLES
61-
62-
### EXAMPLE 1
63-
```
64-
{{ Add code here }}
65-
```
66-
67-
### EXAMPLE 2
68-
```
69-
{{ Add code here }}
70-
```
71-
7260
## PARAMETERS
7361

7462
### -AdditionalProperties
@@ -297,5 +285,6 @@ INPUTOBJECT `<IApplicationsIdentity>`: Identity Parameter
297285

298286

299287

288+
300289

301290

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Confirm-MgApplicationMemberObject.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ Confirm-MgApplicationMemberObject -InputObject <IApplicationsIdentity>
4848
## DESCRIPTION
4949
Invoke action checkMemberObjects
5050

51-
## EXAMPLES
52-
53-
### EXAMPLE 1
54-
```
55-
{{ Add code here }}
56-
```
57-
58-
### EXAMPLE 2
59-
```
60-
{{ Add code here }}
61-
```
62-
6351
## PARAMETERS
6452

6553
### -AdditionalProperties
@@ -286,5 +274,6 @@ INPUTOBJECT `<IApplicationsIdentity>`: Identity Parameter
286274

287275

288276

277+
289278

290279

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Confirm-MgServicePrincipalMemberGroup.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,6 @@ Because Microsoft 365 groups cannot contain other groups, membership in a Micros
6565
| Delegated (personal Microsoft account) | Not supported |
6666
| Application | Application.Read.All, Application.ReadWrite.All, User.Read.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, User.ReadWrite.All, Directory.Read.All, Device.ReadWrite.All, Device.Read.All, Directory.ReadWrite.All, |
6767

68-
## EXAMPLES
69-
70-
### EXAMPLE 1
71-
```
72-
{{ Add code here }}
73-
```
74-
75-
### EXAMPLE 2
76-
```
77-
{{ Add code here }}
78-
```
79-
8068
## PARAMETERS
8169

8270
### -AdditionalProperties
@@ -305,5 +293,6 @@ INPUTOBJECT `<IApplicationsIdentity>`: Identity Parameter
305293

306294

307295

296+
308297

309298

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Confirm-MgServicePrincipalMemberObject.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ Invoke action checkMemberObjects
5656
| Delegated (personal Microsoft account) | Not supported |
5757
| Application | Application.Read.All, Application.ReadWrite.All, User.Read.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, User.ReadWrite.All, Directory.Read.All, Device.ReadWrite.All, Device.Read.All, Directory.ReadWrite.All, |
5858

59-
## EXAMPLES
60-
61-
### EXAMPLE 1
62-
```
63-
{{ Add code here }}
64-
```
65-
66-
### EXAMPLE 2
67-
```
68-
{{ Add code here }}
69-
```
70-
7159
## PARAMETERS
7260

7361
### -AdditionalProperties
@@ -294,5 +282,6 @@ INPUTOBJECT `<IApplicationsIdentity>`: Identity Parameter
294282

295283

296284

285+
297286

298287

0 commit comments

Comments
 (0)