How to report on any Microsoft 365 user attribute

How to report on any Microsoft 365 user attribute

Microsoft 365 user attributes can be used to store a variety of labels and information about users but sometimes, an organization may choose to use a custom user attribute. For example, one organization wanted to allow users to indicate their chosen pronouns but there was no field available for that use. Instead, they decided to use a custom attribute in the mail extension property. However, it can be difficult to filter according to custom attributes. This became a challenge because a conference was coming up and name tags needed to be printed that would include each attendee’s chosen pronoun. The IT admin needed to find a way to create a report based on this custom “pronoun” attribute.

There are a few options that allow you to create a report based on the information in this custom attribute. One of them involves using PowerShell and the other involves using a PowerShell alternative called sapio365.

The PowerShell option for reporting on user attributes

The first way to tackle this report is to use a PowerShell script that allows you to filter by one user attribute. If you are familiar with PowerShell, you can write a custom script that filters users according to whatever property value you choose.

This simple cmdlet lets you retrieve user mailboxes with custom attribute 3 equal to She/Her/Her.

Get-Mailbox -Filter {CustomAttribute3 -eq ‘She/Her/Her’} | Select-Object DisplayName, UserPrincipalName, CustomAttribute3

The problem is that not every Microsoft IT admin can write code. If you are not comfortable writing PowerShell code, you may have to spend some time trying to find a script online that will do the job.

The PowerShell script will give you a list of users that could then be exported to a CSV file but if you have a lot of users, that list may be unmanageably long. You may have difficulty organizing your data in a way that is suitable for your purposes and that shows you what you want to see.

An easier option to report on user attributes

The quicker and easier way to filter according to a property is to use a PowerShell alternative such as sapio365. By using sapio365, you will get a global view and the ability to see all your user data at once, in one place, including users with custom attributes.

If you need to find users with more than one value, or a combination of parameters, it is a simple task because you can combine filters. In the above example regarding pronouns, you could use a sapio365 value filter to eliminate everyone without a chosen pronoun so you can focus on the users you need.

Then you could categorize your users by the pronouns that they are using. With sapio365, you have the option of adding any details or information you need, for example, the users’ department. If you want to create a report that is easy to read and understand, you can remove the columns that you don’t need for a cleaner look.

This is a quick and easy way to prepare and print nametags that include pronouns and enables people who meet the employees to use the correct pronoun. What’s more, exporting this list to an Excel spreadsheet can be done with one click. You can read more about updating user attributes here.

The choice is clear

sapio365 is an easy choice for Microsoft 365 Office IT admins who don’t want to or cannot write a PowerShell script. Finding a script can take some time and is always a bit of a risk, and if you are writing one, you need to be confident that it will not damage the environment unexpectedly. Using sapio365 to accomplish daily tasks can save you hours of time every day and there isn’t much that sapio365 can’t do. Discover how using sapio365 to manage typical Microsoft 365 administration can save you time every single day.


Sonia Bounardjian

Sonia is a sapio365 product specialist at Ytria. She was part of the initial development team that created sapio365. When she's not busy helping sapio365 users virtually or writing helpful articles in this blog, she's reorganizing her impressive collection of unused high heels.