Skip to content

Commit 142a001

Browse files
committed
Merge branch 'main' into DefaultTenant-chrisda
2 parents 535b426 + 1586cdf commit 142a001

File tree

5 files changed

+191
-2
lines changed

5 files changed

+191
-2
lines changed

exchange/exchange-ps/exchange/Restore-RecoverableItems.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,16 @@ This parameter is available only in the cloud-based service.
312312
313313
The RestoreTargetFolder parameter specifies the top-level folder in which to restore data. If you don't specify this parameter, the command restores folders to the top of the folder structure in the target mailbox or archive. Content is merged under existing folders, and new folders are created if they don't already exist in the target folder structure.
314314
315+
This parameter is required for archives and optional for primary mailboxes. A destination folder will be created if it does not exist. Valid paths are:
316+
317+
- `/`
318+
- `/folder1`
319+
- `/folder1/folder2`
320+
- `folder1`
321+
- `folder1/folder2`
322+
```
323+
The preceding or trailing `/` will be ignored. Then, it will be treated as the relative path of the IPM sub-tree: `/Top Of Information Store`.
324+
315325
```yaml
316326
Type: String
317327
Parameter Sets: Default
@@ -345,11 +355,12 @@ Accept wildcard characters: False
345355
The SourceFolder parameter specifies where to search for deleted items in the mailbox. Valid values are:
346356

347357
- DeletedItems: The Deleted Items folder.
348-
- DiscoveryHoldsItems: The Recoverable Items\DiscoveryHolds folder. This folder contains items that have been purged from the Recoverable Items folder (hard-deleted items) and are protected by a hold.
349358
- RecoverableItems: The Recoverable Items\Deletions folder. This folder contains items that have been deleted from the Deleted Items folder (soft-deleted items).
350359
- PurgedItems: The Recoverable Items\Purges folder. This folder contains items that have been purged from the Recoverable Items folder (hard-deleted items).
351360

352-
If you don't use this parameter, the command will search all of these folders.
361+
If you don't use this parameter, the command will search these three folders.
362+
363+
- DiscoveryHoldsItems: The Recoverable Items\DiscoveryHolds folder. This folder contains items that have been purged from the Recoverable Items folder (hard-deleted items) and are protected by a hold. To search for deleted items in this folder, use this parameter with the value DiscoveryHoldsItems.
353364

354365
```yaml
355366
Type: RecoverableItemsFolderType

exchange/exchange-ps/exchange/Set-RemoteDomain.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ The AllowedOOFType parameter specifies the type of automatic replies or out-of-o
107107
- InternalLegacy: Only internal automatic replies or automatic replies that aren't designated as internal or external are sent to recipients in the remote domain.
108108
- None: No automatic replies are sent to recipients in the remote domain.
109109
110+
The value of this parameter is affected by the value of the IsInternal parameter, and vice-versa:
111+
112+
- If you change the AllowedOOFType parameter to the value InternalLegacy, the IsInternal parameter is changed to the value $true.
113+
- If you change the IsInternal parameter to the value $false, the AllowedOOFType parameter is changed to the value ExternalLegacy.
114+
110115
```yaml
111116
Type: AllowedOOFType
112117
Parameter Sets: (All)
@@ -331,6 +336,11 @@ The IsInternal parameter specifies whether the recipients in the remote domain a
331336
- $true: All transport components (for example, transport rules) treat recipients in the remote domain as internal recipients. Typically, you use this value in cross-forest deployments.
332337
- $false: Recipients in the remote domain are treated as external recipients. This is the default value.
333338

339+
The value of this parameter is affected by the value of the AllowedOOFType parameter, and vice-versa:
340+
341+
- If you change the AllowedOOFType parameter to the value InternalLegacy, the IsInternal parameter is changed to the value $true.
342+
- If you change the IsInternal parameter to the value $false, the AllowedOOFType parameter is changed to the value ExternalLegacy.
343+
334344
```yaml
335345
Type: Boolean
336346
Parameter Sets: (All)
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
external help file: Microsoft.Exchange.RolesAndAccess-Help.xml
3+
online version: https://learn.microsoft.com/powershell/module/exchange/test-serviceprincipalauthorization
4+
applicable: Exchange Online
5+
title: Test-ServicePrincipalAuthorization
6+
schema: 2.0.0
7+
author: chrisda
8+
ms.author: chrisda
9+
ms.reviewer:
10+
---
11+
12+
# Test-ServicePrincipalAuthorization
13+
14+
## SYNOPSIS
15+
This cmdlet is available only in the cloud-based service.
16+
17+
Use the Test-ServicePrincipalAuthorization cmdlet to test the access granted by role-based access control (RBAC) for Applications. For more information, see [Role Based Access Control for Applications in Exchange Online](https://learn.microsoft.com/Exchange/permissions-exo/application-rbac).
18+
19+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
20+
21+
## SYNTAX
22+
23+
```
24+
Test-ServicePrincipalAuthorization [-Identity] <ServicePrincipalIdParameter>
25+
[-Confirm]
26+
[-Organization <OrganizationIdParameter>]
27+
[-Resource <UserIdParameter>]
28+
[-WhatIf]
29+
[<CommonParameters>]
30+
```
31+
32+
## DESCRIPTION
33+
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://learn.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
34+
35+
## EXAMPLES
36+
37+
### Example 1
38+
```powershell
39+
PS C:\> Test-ServicePrincipalAuthorization -Identity "DemoB" -Resource "Mailbox A" | Format-Table
40+
41+
RoleName GrantedPermissions AllowedResourceScope ScopeType InScope
42+
-------- ------------------ -------------------- --------- ------
43+
Application Mail.Read Mail.Read Canadian Employees CustomRecipientScope True
44+
Application Calendars.Read Calendars.Read 4d819ce9-9257-44.. AdministrativeUnit False
45+
Application Contacts.Read Contacts.Read Organization Organization True
46+
```
47+
48+
This example tests if this service principal (the app named "DemoB") can exercise each of its assigned permissions against the target mailbox named "Mailbox A." The membership in the scope is indicated by the InScope column.
49+
50+
### Example 2
51+
```powershell
52+
PS C:\> Test-ServicePrincipalAuthorization -Identity "DemoB" | Format-Table
53+
54+
RoleName GrantedPermissions AllowedResourceScope ScopeType InScope
55+
-------- ------------------ -------------------- --------- ------
56+
Application Mail.Read Mail.Read Canadian Employees CustomRecipientScope Not Run
57+
Application Calendars.Read Calendars.Read 4d819ce9-9257-44.. AdministrativeUnit Not Run
58+
Application Contacts.Read Contacts.Read Organization Organization Not Run
59+
```
60+
61+
This example tests the entitlement of the app named "DemoB", including which permissions it has at which scopes. Because the command doesn't use the Resource parameter, the scope membership check is not run.
62+
63+
## PARAMETERS
64+
65+
### -Identity
66+
The Identity parameter specifies the service principal that you want to test. You can use any value that uniquely identifies the service principal. For example:
67+
68+
- Name
69+
- Distinguished name (DN)
70+
- GUID
71+
- AppId
72+
- ServiceId
73+
74+
```yaml
75+
Type: ServicePrincipalIdParameter
76+
Parameter Sets: (All)
77+
Aliases:
78+
Applicable: Exchange Online
79+
80+
Required: True
81+
Position: 0
82+
Default value: None
83+
Accept pipeline input: True (ByPropertyName, ByValue)
84+
Accept wildcard characters: False
85+
```
86+
87+
### -Confirm
88+
This parameter is reserved for internal Microsoft use.
89+
90+
```yaml
91+
Type: SwitchParameter
92+
Parameter Sets: (All)
93+
Aliases: cf
94+
Applicable: Exchange Online
95+
96+
Required: False
97+
Position: Named
98+
Default value: None
99+
Accept pipeline input: False
100+
Accept wildcard characters: False
101+
```
102+
103+
### -Organization
104+
This parameter is reserved for internal Microsoft use.
105+
106+
```yaml
107+
Type: OrganizationIdParameter
108+
Parameter Sets: (All)
109+
Aliases:
110+
Applicable: Exchange Online
111+
112+
Required: False
113+
Position: Named
114+
Default value: None
115+
Accept pipeline input: True (ByPropertyName, ByValue)
116+
Accept wildcard characters: False
117+
```
118+
119+
### -Resource
120+
The Resource parameter specifies the target mailbox where the scoped permissions apply. You can use any value that uniquely identifies the mailbox. For example:
121+
122+
- Name
123+
- Distinguished name (DN)
124+
- Canonical DN
125+
- GUID
126+
127+
```yaml
128+
Type: UserIdParameter
129+
Parameter Sets: (All)
130+
Aliases:
131+
Applicable: Exchange Online
132+
133+
Required: False
134+
Position: Named
135+
Default value: None
136+
Accept pipeline input: True (ByPropertyName, ByValue)
137+
Accept wildcard characters: False
138+
```
139+
140+
### -WhatIf
141+
This parameter is reserved for internal Microsoft use.
142+
143+
```yaml
144+
Type: SwitchParameter
145+
Parameter Sets: (All)
146+
Aliases: wi
147+
Applicable: Exchange Online
148+
149+
Required: False
150+
Position: Named
151+
Default value: None
152+
Accept pipeline input: False
153+
Accept wildcard characters: False
154+
```
155+
156+
### CommonParameters
157+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
158+
159+
## INPUTS
160+
161+
## OUTPUTS
162+
163+
## NOTES
164+
165+
## RELATED LINKS

exchange/exchange-ps/exchange/exchange.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,6 +1674,8 @@ Exchange PowerShell is built on Windows PowerShell technology and provides a pow
16741674

16751675
### [Test-OAuthConnectivity](Test-OAuthConnectivity.md)
16761676

1677+
### [Test-ServicePrincipalAuthorization](Test-ServicePrincipalAuthorization.md)
1678+
16771679
### [Test-SystemHealth](Test-SystemHealth.md)
16781680

16791681
### [Update-ExchangeHelp](Update-ExchangeHelp.md)

exchange/mapping/serviceMapping.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@
820820
"Set-SettingOverride": "organization",
821821
"Test-ApplicationAccessPolicy": "organization",
822822
"Test-OAuthConnectivity": "organization",
823+
"Test-ServicePrincipalAuthorization": "organization",
823824
"Test-SystemHealth": "organization",
824825
"Update-ExchangeHelp": "organization",
825826
"Disable-JournalArchiving": "policy-and-compliance",

0 commit comments

Comments
 (0)