Temporary glitch in the way Exchange Online object identities were returned

The new year greeted us with an interesting glitch, or intentional change, with the way Exchange Online PowerShell displays some properties. As first reported in this TechNet forums thread, suddenly we were seeing different values for properties such as the Retention policy, all of them being prefixed by the tenant name. Here’s an example:

PS>Get-Mailbox vasil |select RetentionPolicy

RetentionPolicy            : michev.onmicrosoft.com\New

After some investigation, it turned out that this behavior is observed for a bunch of other properties:

PS>Get-Mailbox vasil |fl *Policy

RetentionPolicy            : michev.onmicrosoft.com\New
RoleAssignmentPolicy       : michev.onmicrosoft.com\Default Role Assignment Policy
SharingPolicy              : michev.onmicrosoft.com\Default Sharing Policy

or Address book policies:

PS>Get-AddressBookPolicy

Name            GlobalAddressList              AddressLists                                                         OfflineAddressBook             RoomList
----            -----------------              ------------                                                         ------------------             --------
All Contoso ABP michev.onmicrosoft.com\New GAL {michev.onmicrosoft.com\All Users, michev.onmicrosoft.com\All Rooms} michev.onmicrosoft.com\New OAB michev.onmicrosoft.com\All Rooms
Teams           michev.onmicrosoft.com\New GAL {michev.onmicrosoft.com\CustomAttribute15}                           michev.onmicrosoft.com\New OAB michev.onmicrosoft.com\Rooms15

Some other properties, such as the Manager property of user objects displayed even longer identifier, which resembled the user’s DN property:

PS>Get-User vasil | select -ExpandProperty manager

EURPR03A001.prod.outlook.com/Microsoft Exchange Hosted Organizations/michev.onmicrosoft.com/HuKu

and so did properties such as GrantSendOnBehalfTo:

PS>Get-Mailbox huku |select -ExpandProperty GrantSendOnBehalfTo

EURPR03A001.prod.outlook.com/Microsoft Exchange Hosted Organizations/michev.onmicrosoft.com/vasil

Looking at the properties of the actual objects, it was visible that this was a change with the Id and Identity attributes, which in turn are surfaced whenever those objects are referenced by other cmdlets:

PS>Get-Mailbox vasil | fl Id*

Identity                               : EURPR03A001.prod.outlook.com/Microsoft Exchange Hosted Organizations/michev.onmicrosoft.com/vasil
Id                                     : EURPR03A001.prod.outlook.com/Microsoft Exchange Hosted Organizations/michev.onmicrosoft.com/vasil

While in general this was not anything major, it was potentially breaking change for scripts that weren’t coded to handle the new format properly. On the other hand, this might have been a good change, as it eliminated the ambiguity of the Identity parameter, which could match across multiple objects. In any case, things are “back to normal” now, and we can see the “standard” values for object’s identities once more.

This entry was posted in Exchange Online, Office 365, PowerShell. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *