Customize Profile Card

Add Azure AD Attributes to Profile Card

On the profile card in Microsoft 365, you can find information about users that is stored and maintained by your organization, for example Job title or Office location.

Microsoft Graph has new API’s that allows us to add Azure AD Attributes to the profile card, they use the profileCardProperty resource to show additional properties for an organization, by:

  • Making additional attributes visible
  • Adding custom attributes

Additional properties will display in the Contact section of the profile card in Microsoft 365.

Making additional attributes visible

The following attributes from Azure Active Directory are available and can be visible on users’ profile cards.

  • UserPrincipalName
  • Fax
  • StreetAddress
  • PostalCode
  • StateOrProvince
  • Alias

The following table shows how the Azure AD attributes correspond with properties of the Microsoft Graph user entity.

Azure AD attributeUser entity property
UserPrincipalNameuserPrincipalName
FaxfaxNumber
StreetAddressstreetAddress
PostalCodepostalCode
StateOrProvincestate
AliasmailNickname

Adding custom attributes

You can add any of the 15 Azure AD custom extension attributes to users’ profile cards by calling the new Microsoft Graph API’s

The onPremisesExtensionAttributes property of the user entity contains fifteen custom extension attribute properties. For an onPremisesSyncEnabled user, the source of authority for this set of properties is the on-premises Active Directory which is synchronized to Azure AD, and is read-only. For a cloud-only user (where onPremisesSyncEnabled is false), these properties may be set during creation or update.

Note: These extension attributes are also known as Exchange custom attributes 1-15.

The following table shows how the Azure AD custom extension attribute names correspond to the supported values for the directoryPropertyName property of the profileCardProperty resource. These Azure AD custom extension attribute names are not case-sensitive:

Azure AD custom extension attributeValue to specify as directoryPropertyName
extensionAttribute1customAttribute1
extensionAttribute2customAttribute2
extensionAttribute3customAttribute3
extensionAttribute4customAttribute4
extensionAttribute5customAttribute5
extensionAttribute6customAttribute6
extensionAttribute7customAttribute7
extensionAttribute8customAttribute8
extensionAttribute9customAttribute9
extensionAttribute10customAttribute10
extensionAttribute11customAttribute11
extensionAttribute12customAttribute12
extensionAttribute13customAttribute13
extensionAttribute14customAttribute14
extensionAttribute15customAttribute15

Advantages of custom attributes

There are several advantages to using custom attributes:

  • You avoid extending the Active Directory schema.
  • You don’t have to do the work, because the attributes are created by Exchange Setup.
  • You can use the EAC or the Exchange Management Shell to manage the attributes. You don’t need to build custom controls or write scripts to populate and display these attributes.
  • You can filter and reuse the attributes, as attributes are filterable properties that can be used in the Filter parameter with recipient cmdlets such as Get-Mailbox. They can also be used in the EAC and the Exchange Management Shell to create filters for e-mail address policies, address lists, and dynamic distribution groups.

Add Custom Attributes Values to User Object

To associate Azure Ad custom attributes to User’s Profile we can use Exchange Management Shell to manage the attributes or we can use the Exchange Admin Center to add the values for this properties to recipientes.

Example using PowerShel:

Set-Mailbox -Identity ABCD  -CustomAttribute1 "C-123456789"

Example using Exchange Admin Center:

Useful links

Thank you for reading!

%d bloggers like this: