How to report or update extension attributes in Azure AD

Rick Angel 91 Reputation points
2023-03-13T21:07:12.9766667+00:00

I need to run a report to show the value in extensionAttribute1 for all guest users in Azure AD. A lot of the values are empty. I have not been able to query for an empty attribute using the Azure AD Users GUI. I was considering populating all currently empty values with "TBD". I don't know a way to mass update extensionAttribute1 but only for empty values. Note this is a GCC High tenant. Any suggestions for mass reporting or updating appreciated.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,041 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,436 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 95,081 Reputation points MVP
    2023-03-14T07:10:39.48+00:00

    If the idea is to filter the users with "empty" attribute values, it's much easier to use the Exchange cmdlets. For example:

    Get-MailUser -Filter {CustomAttribute1 -eq $null -and RecipientTypeDetails -eq "GuestMailUser"}

    You can then pass the output to the Set-MailUser cmdlet to populate the attribute values as needed.


0 additional answers

Sort by: Most helpful