I am trying to retrieve the UPN for specific shared mailboxes on my O365 Tenant. When I run the command:
Get-MailboxPermission -identity MyMailbox1
I get the following results...
Identity User AccessRights
IsInherited Deny
-------- ---- ------------
----------- ----
MyMailbox1 NT AUTHORITY\SELF {FullAccess, ReadPermission} False False
MyMailbox1 NT AUTHORITY\SELF {FullAccess, ExternalAccount, ReadPermission} False False
MyMailbox1 Test User {FullAccess} False False
.............etc
There are several users with the name "Test User" in the tenant. I am looking to gather the actual UserPrincipalName or unique identifier that I can use.
Any suggestions?