Skip to content

Commit 3aca5a0

Browse files
authored
Update Test-ServicePrincipalAuthorization.md
Adding examples
1 parent e309362 commit 3aca5a0

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,26 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3535
## EXAMPLES
3636

3737
### Example 1
38+
Testing if this service principal can exercise each of its assigned permissions against the target mailbox "Mailbox A." The membership in the scope is indicated by the InScope column.
3839
```powershell
39-
Test-ServicePrincipalAuthorization -Identity "DemoB" -Resource "Test Mailbox" | Format-Table
40+
Test-ServicePrincipalAuthorization -Identity "DemoB" -Resource "Mailbox A" | Format-Table
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+
49+
### Example 2
50+
Testing the entitlement of DemoB including which permissions it has at which scopes. Since there is no target resource included the scope membership check is not run.
51+
```powershell
52+
Test-ServicePrincipalAuthorization -Identity "DemoB" | Format-Table
53+
RoleName GrantedPermissions AllowedResourceScope ScopeType InScope
54+
-------- ------------------ -------------------- --------- ------
55+
Application Mail.Read Mail.Read Canadian Employees CustomRecipientScope Not Run
56+
Application Calendars.Read Calendars.Read 4d819ce9-9257-44.. AdministrativeUnit Not Run
57+
Application Contacts.Read Contacts.Read Organization Organization Not Run
4058
```
4159

4260
This example tests the RBAC for Applications permissions assigned to DemoB on the mailbox named Test Mailbox

0 commit comments

Comments
 (0)