Skip to content

Commit 9a1dc4d

Browse files
authored
Merge pull request #2245 from microsoftgraph/WeeklyExamplesUpdate/202308121932
[v2] Examples Update
2 parents 8cf7d75 + 89f5ead commit 9a1dc4d

File tree

449 files changed

+4862
-5658
lines changed

Some content is hidden

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

449 files changed

+4862
-5658
lines changed
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
### Example 1: Using the Add-MgBetaServicePrincipalTokenSigningCertificate Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Applications
6+
47
$params = @{
5-
DisplayName = "CN=customDisplayName"
6-
EndDateTime = [System.DateTime]::Parse("2024-01-25T00:00:00Z")
8+
displayName = "CN=customDisplayName"
9+
endDateTime = [System.DateTime]::Parse("2024-01-25T00:00:00Z")
710
}
11+
812
Add-MgBetaServicePrincipalTokenSigningCertificate -ServicePrincipalId $servicePrincipalId -BodyParameter $params
13+
914
```
1015
This example shows how to use the Add-MgBetaServicePrincipalTokenSigningCertificate Cmdlet.
11-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
16+

src/Applications/v1.0/examples/Get-MgApplicationFederatedIdentityCredential.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Import-Module Microsoft.Graph.Applications
66
7-
Get-MgApplicationFederatedIdentityCredential -ApplicationId $applicationId
7+
Get-MgApplicationFederatedIdentityCredential -ApplicationId $applicationId -FederatedIdentityCredentialId $federatedIdentityCredentialId
88
99
```
1010
This example shows how to use the Get-MgApplicationFederatedIdentityCredential Cmdlet.

src/Bookings/v1.0/examples/Get-MgBookingBusinessCustomQuestion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Import-Module Microsoft.Graph.Bookings
66
7-
Get-MgBookingBusinessCustomQuestion -BookingBusinessId $bookingBusinessId
7+
Get-MgBookingBusinessCustomQuestion -BookingBusinessId $bookingBusinessId -BookingCustomQuestionId $bookingCustomQuestionId
88
99
```
1010
This example shows how to use the Get-MgBookingBusinessCustomQuestion Cmdlet.
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
### Example 1: Using the Get-MgBetaCommunicationCallAudioRoutingGroup Cmdlet
2-
```powershell
3-
Import-Module Microsoft.Graph.Beta.CloudCommunications
4-
Get-MgBetaCommunicationCallAudioRoutingGroup -CallId $callId -AudioRoutingGroupId $audioRoutingGroupId
5-
```
6-
This example shows how to use the Get-MgBetaCommunicationCallAudioRoutingGroup Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaCommunicationCallAudioRoutingGroup Cmdlet
1+
### Example 1: Code snippet
2+
93
```powershell
4+
105
Import-Module Microsoft.Graph.Beta.CloudCommunications
6+
117
Get-MgBetaCommunicationCallAudioRoutingGroup -CallId $callId
8+
129
```
1310
This example shows how to use the Get-MgBetaCommunicationCallAudioRoutingGroup Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+

src/CloudCommunications/beta/examples/Get-MgBetaCommunicationCallContentSharingSession.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Import-Module Microsoft.Graph.Beta.CloudCommunications
66
7-
Get-MgBetaCommunicationCallContentSharingSession -CallId $callId -ContentSharingSessionId $contentSharingSessionId
7+
Get-MgBetaCommunicationCallContentSharingSession -CallId $callId
88
99
```
1010
This example shows how to use the Get-MgBetaCommunicationCallContentSharingSession Cmdlet.
Lines changed: 2 additions & 2 deletions
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.Beta.CloudCommunications
56
67
Get-MgBetaCommunicationCallOperation -CallId $callId -CommsOperationId $commsOperationId
8+
79
```
810
This example shows how to use the Get-MgBetaCommunicationCallOperation Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
### Example 1: Code snippet
1+
### Example 1: Get the presence information of another user
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Beta.CloudCommunications
56
67
Get-MgBetaCommunicationPresence -PresenceId $presenceId
7-
```
8-
This example shows how to use the Get-MgBetaCommunicationPresence Cmdlet.
98
10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
9+
```
10+
This example will get the presence information of another user
1111

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Example 1: Code snippet
1+
### Example 1: List attendance records
22

33
```powershell
44
@@ -8,5 +8,17 @@ Import-Module Microsoft.Graph.Beta.CloudCommunications
88
Get-MgBetaUserOnlineMeetingAttendanceReportAttendanceRecord -UserId $userId -OnlineMeetingId $onlineMeetingId -MeetingAttendanceReportId $meetingAttendanceReportId
99
1010
```
11-
This example shows how to use the Get-MgBetaUserOnlineMeetingAttendanceReportAttendanceRecord Cmdlet.
11+
This example will list attendance records
12+
13+
### Example 2: List attendance records containing Azure Communication Services users
14+
15+
```powershell
16+
17+
Import-Module Microsoft.Graph.Beta.CloudCommunications
18+
19+
# A UPN can also be used as -UserId.
20+
Get-MgBetaUserOnlineMeetingAttendanceReportAttendanceRecord -UserId $userId -OnlineMeetingId $onlineMeetingId -MeetingAttendanceReportId $meetingAttendanceReportId
21+
22+
```
23+
This example will list attendance records containing azure communication services users
1224

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Example 1: Code snippet
1+
### Example 1: Get your own presence information
22

33
```powershell
44
@@ -8,9 +8,9 @@ Import-Module Microsoft.Graph.Beta.CloudCommunications
88
Get-MgBetaUserPresence -UserId $userId
99
1010
```
11-
This example shows how to use the Get-MgBetaUserPresence Cmdlet.
11+
This example will get your own presence information
1212

13-
### Example 2: Code snippet
13+
### Example 2: Get the presence information of another user
1414

1515
```powershell
1616
@@ -19,5 +19,5 @@ Import-Module Microsoft.Graph.Beta.CloudCommunications
1919
Get-MgBetaUserPresence -UserId $userId
2020
2121
```
22-
This example shows how to use the Get-MgBetaUserPresence Cmdlet.
22+
This example will get the presence information of another user
2323

src/CloudCommunications/beta/examples/Invoke-MgBetaInviteCommunicationCallParticipant.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,89 @@ Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $
2727
```
2828
This example shows how to use the Invoke-MgBetaInviteCommunicationCallParticipant Cmdlet.
2929

30+
### Example 2: Code snippet
31+
32+
```powershell
33+
34+
Import-Module Microsoft.Graph.Beta.CloudCommunications
35+
36+
$params = @{
37+
participants = @(
38+
@{
39+
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
40+
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
41+
identity = @{
42+
"@odata.type" = "#microsoft.graph.identitySet"
43+
user = @{
44+
"@odata.type" = "#microsoft.graph.identity"
45+
id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe"
46+
identityProvider = "AAD"
47+
}
48+
}
49+
}
50+
)
51+
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
52+
}
53+
54+
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
55+
56+
```
57+
This example shows how to use the Invoke-MgBetaInviteCommunicationCallParticipant Cmdlet.
58+
59+
### Example 3: Code snippet
60+
61+
```powershell
62+
63+
Import-Module Microsoft.Graph.Beta.CloudCommunications
64+
65+
$params = @{
66+
participants = @(
67+
@{
68+
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
69+
identity = @{
70+
"@odata.type" = "#microsoft.graph.identitySet"
71+
phone = @{
72+
"@odata.type" = "#microsoft.graph.identity"
73+
id = "+12345678901"
74+
}
75+
}
76+
}
77+
)
78+
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
79+
}
80+
81+
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
82+
83+
```
84+
This example shows how to use the Invoke-MgBetaInviteCommunicationCallParticipant Cmdlet.
85+
86+
### Example 4: Code snippet
87+
88+
```powershell
89+
90+
Import-Module Microsoft.Graph.Beta.CloudCommunications
91+
92+
$params = @{
93+
participants = @(
94+
@{
95+
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
96+
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
97+
participantId = "7d501bf1-5ee4-4605-ba92-0ae4513c611c"
98+
identity = @{
99+
"@odata.type" = "#microsoft.graph.identitySet"
100+
user = @{
101+
"@odata.type" = "#microsoft.graph.identity"
102+
id = "682b6c37-0729-4fab-ace6-d730d5d9137e"
103+
identityProvider = "AAD"
104+
}
105+
}
106+
}
107+
)
108+
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
109+
}
110+
111+
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
112+
113+
```
114+
This example shows how to use the Invoke-MgBetaInviteCommunicationCallParticipant Cmdlet.
115+

0 commit comments

Comments
 (0)