Skip to content

Commit 233a801

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Repaired examples and descriptions
1 parent 34994ef commit 233a801

File tree

12,442 files changed

+45605
-113236
lines changed

Some content is hidden

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

12,442 files changed

+45605
-113236
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
@@ -63,34 +63,38 @@ You can use the Update application operation to perform an update instead.
6363
[!INCLUDE [permissions-table](~/../graphref/api-reference/v1.0/includes/permissions/application-addkey-permissions.md)]
6464

6565
## EXAMPLES
66+
### Example 1: Add a new key credential to an application
67+
68+
```powershell
6669
67-
### EXAMPLE 1
68-
```
6970
Import-Module Microsoft.Graph.Applications
70-
```
7171
7272
$params = @{
7373
keyCredential = @{
7474
type = "AsymmetricX509Cert"
7575
usage = "Verify"
76-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
76+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
7777
}
7878
passwordCredential = $null
7979
proof = "eyJ0eXAiOiJ..."
8080
}
8181
8282
Add-MgApplicationKey -ApplicationId $applicationId -BodyParameter $params
8383
84-
### EXAMPLE 2
8584
```
85+
This example will add a new key credential to an application
86+
87+
### Example 2: Add a key credential and an associated password for the key
88+
89+
```powershell
90+
8691
Import-Module Microsoft.Graph.Applications
87-
```
8892
8993
$params = @{
9094
keyCredential = @{
9195
type = "X509CertAndPassword"
9296
usage = "Sign"
93-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
97+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
9498
}
9599
passwordCredential = @{
96100
secretText = "MKTr0w1..."
@@ -100,6 +104,10 @@ $params = @{
100104
101105
Add-MgApplicationKey -ApplicationId $applicationId -BodyParameter $params
102106
107+
```
108+
This example will add a key credential and an associated password for the key
109+
110+
103111
## PARAMETERS
104112

105113
### -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
@@ -55,11 +55,11 @@ You can also add passwords while creating the application.
5555
[!INCLUDE [permissions-table](~/../graphref/api-reference/v1.0/includes/permissions/application-addpassword-permissions.md)]
5656

5757
## EXAMPLES
58+
### Example 1: Add a password credential to an application with a six month expiry
59+
60+
```powershell
5861
59-
### EXAMPLE 1
60-
```
6162
Connect-MgGraph -Scopes 'Application.ReadWrite.All'
62-
```
6363
6464
$appObjectId = 'eaf1e531-0d58-4874-babe-b9a9f436e6c3'
6565
@@ -78,13 +78,17 @@ Hint : Q_e
7878
KeyId : c82bb763-741b-4575-9d9d-df7e766f6999
7979
SecretText : Q_e8Q~ZDWJD.bkgajbREp-VFFUayCuEk8b1hDcr9
8080
StartDateTime : 26/5/2022 1:03:31 pm
81-
AdditionalProperties : {\[@odata.context,
82-
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential\]}
83-
84-
### EXAMPLE 2
81+
AdditionalProperties : {[@odata.context,
82+
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential]}
8583
```
84+
85+
Add a password to an application that expires in six months from the current date.
86+
87+
### Example 2: Add a password credential to an application with a start date
88+
89+
```powershell
90+
8691
Connect-MgGraph -Scopes 'Application.ReadWrite.All'
87-
```
8892
8993
$appObjectId = 'eaf1e531-0d58-4874-babe-b9a9f436e6c3'
9094
@@ -107,8 +111,13 @@ Hint : TiA
107111
KeyId : 082bf20f-63d6-4970-bb4e-55e504f50d8b
108112
SecretText : TiA8Q~Zs7ej1cGtlW0qnmuFi~JlxXTZew_tU1bGA
109113
StartDateTime : 26/5/2022 2:00:00 pm
110-
AdditionalProperties : {\[@odata.context,
111-
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential\]}
114+
AdditionalProperties : {[@odata.context,
115+
https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential]}
116+
```
117+
118+
Add a password to an application that becomes valid at 12:00 am the next day and is valid for six months.
119+
120+
Use `$secret.StartDateTime.ToLocalTime()` to convert the returned dates from UTC to the local timezone.
112121

113122
## PARAMETERS
114123

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
@@ -60,34 +60,38 @@ Update servicePrincipal can be used to perform an update instead.
6060
[!INCLUDE [permissions-table](~/../graphref/api-reference/v1.0/includes/permissions/serviceprincipal-addkey-permissions.md)]
6161

6262
## EXAMPLES
63+
### Example 1: Adding a new key credential to a servicePrincipal
64+
65+
```powershell
6366
64-
### EXAMPLE 1
65-
```
6667
Import-Module Microsoft.Graph.Applications
67-
```
6868
6969
$params = @{
7070
keyCredential = @{
7171
type = "AsymmetricX509Cert"
7272
usage = "Verify"
73-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
73+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
7474
}
7575
passwordCredential = $null
7676
proof = "eyJ0eXAiOiJ..."
7777
}
7878
7979
Add-MgServicePrincipalKey -ServicePrincipalId $servicePrincipalId -BodyParameter $params
8080
81-
### EXAMPLE 2
8281
```
82+
This example shows adding a new key credential to a serviceprincipal
83+
84+
### Example 2: Adding a key credential and an associated password for the key
85+
86+
```powershell
87+
8388
Import-Module Microsoft.Graph.Applications
84-
```
8589
8690
$params = @{
8791
keyCredential = @{
8892
type = "X509CertAndPassword"
8993
usage = "Sign"
90-
key = \[System.Text.Encoding\]::ASCII.GetBytes("MIIDYDCCAki...")
94+
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
9195
}
9296
passwordCredential = @{
9397
secretText = "MKTr0w1..."
@@ -97,6 +101,10 @@ $params = @{
97101
98102
Add-MgServicePrincipalKey -ServicePrincipalId $servicePrincipalId -BodyParameter $params
99103
104+
```
105+
This example shows adding a key credential and an associated password for the key
106+
107+
100108
## PARAMETERS
101109

102110
### -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
@@ -50,11 +50,11 @@ Add a strong password or secret to a servicePrincipal object.
5050
[!INCLUDE [permissions-table](~/../graphref/api-reference/v1.0/includes/permissions/serviceprincipal-addpassword-permissions.md)]
5151

5252
## EXAMPLES
53+
### Example 1: Code snippet
54+
55+
```powershell
5356
54-
### EXAMPLE 1
55-
```
5657
Import-Module Microsoft.Graph.Applications
57-
```
5858
5959
$params = @{
6060
passwordCredential = @{
@@ -64,6 +64,10 @@ $params = @{
6464
6565
Add-MgServicePrincipalPassword -ServicePrincipalId $servicePrincipalId -BodyParameter $params
6666
67+
```
68+
This example shows how to use the Add-MgServicePrincipalPassword Cmdlet.
69+
70+
6771
## PARAMETERS
6872

6973
### -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
@@ -68,19 +68,23 @@ The endDateTime can be up to three years after the certificate is created.
6868
[!INCLUDE [permissions-table](~/../graphref/api-reference/v1.0/includes/permissions/serviceprincipal-addtokensigningcertificate-permissions.md)]
6969

7070
## EXAMPLES
71+
### Example 1: Code snippet
72+
73+
```powershell
7174
72-
### EXAMPLE 1
73-
```
7475
Import-Module Microsoft.Graph.Applications
75-
```
7676
7777
$params = @{
7878
displayName = "CN=customDisplayName"
79-
endDateTime = \[System.DateTime\]::Parse("2024-01-25T00:00:00Z")
79+
endDateTime = [System.DateTime]::Parse("2024-01-25T00:00:00Z")
8080
}
8181
8282
Add-MgServicePrincipalTokenSigningCertificate -ServicePrincipalId $servicePrincipalId -BodyParameter $params
8383
84+
```
85+
This example shows how to use the Add-MgServicePrincipalTokenSigningCertificate Cmdlet.
86+
87+
8488
## PARAMETERS
8589

8690
### -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
@@ -39,14 +39,18 @@ For more information, see Publisher verification.
3939
[!INCLUDE [permissions-table](~/../graphref/api-reference/v1.0/includes/permissions/application-unsetverifiedpublisher-permissions.md)]
4040

4141
## EXAMPLES
42+
### Example 1: Code snippet
43+
44+
```powershell
4245
43-
### EXAMPLE 1
44-
```
4546
Import-Module Microsoft.Graph.Applications
46-
```
4747
4848
Clear-MgApplicationVerifiedPublisher -ApplicationId $applicationId
4949
50+
```
51+
This example shows how to use the Clear-MgApplicationVerifiedPublisher Cmdlet.
52+
53+
5054
## PARAMETERS
5155

5256
### -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
@@ -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-MgServicePrincipalMemberObject.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ Confirm-MgServicePrincipalMemberObject -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

0 commit comments

Comments
 (0)