|
1 | | -### Example 1 |
| 1 | +### Example 1: Code snippet |
2 | 2 |
|
3 | | -```powershellImport-Module Microsoft.Graph.Beta.Mail |
| 3 | +```powershell |
| 4 | +Import-Module Microsoft.Graph.Beta.Mail |
4 | 5 |
|
5 | 6 | # A UPN can also be used as -UserId. |
6 | | -Get-MgBetaUserMessage -UserId $userId -MessageId $messageId |
7 | | -``` |
8 | | -This example shows how to use the Get-MgBetaUserMessage Cmdlet. |
9 | | -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). |
10 | | -
|
11 | | -### Example 2 |
| 7 | +Get-MgBetaUserMessageExtension -UserId $userId -MessageId $messageId -ExtensionId $extensionId |
| 8 | +``` |
| 9 | +This example shows how to use the Get-MgBetaUserMessage Cmdlet. |
12 | 10 |
|
13 | | -```powershellImport-Module Microsoft.Graph.Beta.Mail |
| 11 | +To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). |
| 12 | + |
| 13 | +### Example 2: Code snippet |
| 14 | + |
| 15 | +```powershell |
| 16 | +Import-Module Microsoft.Graph.Beta.Mail |
14 | 17 |
|
15 | 18 | # A UPN can also be used as -UserId. |
16 | | -Get-MgBetaUserMessage -UserId $userId -MessageId $messageId -ExpandProperty "microsoft.graph.eventMessage/event" |
17 | | -``` |
18 | | -This example shows how to use the Get-MgBetaUserMessage Cmdlet. |
19 | | -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). |
20 | | - |
| 19 | +Get-MgBetaUserMessage -UserId $userId -MessageId $messageId -ExpandProperty "extensions(`$filter=id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')" |
| 20 | +``` |
| 21 | +This example shows how to use the Get-MgBetaUserMessage Cmdlet. |
| 22 | + |
| 23 | +To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). |
| 24 | + |
| 25 | +### Example 3: Code snippet |
| 26 | + |
| 27 | +```powershell |
| 28 | +Import-Module Microsoft.Graph.Beta.Mail |
| 29 | +
|
| 30 | +# A UPN can also be used as -UserId. |
| 31 | +Get-MgBetaUserMessage -UserId $userId -Filter "Extensions/any(f:f/id eq 'Com.Contoso.Referral')" -ExpandProperty "Extensions(`$filter=id eq 'Com.Contoso.Referral')" |
| 32 | +``` |
| 33 | +This example shows how to use the Get-MgBetaUserMessage Cmdlet. |
| 34 | + |
| 35 | +To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). |
| 36 | + |
0 commit comments