Skip to content

Commit 4725bbe

Browse files
authored
Merge pull request #10400 from msftnelder/patch-4
Update Test-ServicePrincipalAuthorization.md
2 parents 5bb5eb9 + 13f2523 commit 4725bbe

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

exchange/exchange-ps/exchange/Test-ServicePrincipalAuthorization.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,29 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3636

3737
### Example 1
3838
```powershell
39-
Test-ServicePrincipalAuthorization -Identity "DemoB" -Resource "Test Mailbox" | Format-Table
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
4059
```
4160

42-
This example tests the RBAC for Applications permissions assigned to the app DemoB on the mailbox named "Test Mailbox"
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.
4362

4463
## PARAMETERS
4564

0 commit comments

Comments
 (0)