Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community

Is there a graph API equivalent for un hiding user from GAL for Azure AD B2B user

Copper Contributor

I am aware of PowerShell Script to unhide user from GAL by doing so (example):

Set-AzureADUser -GivenName $first -Surname $last -JobTitle $title -Department $dept -ShowInAddressList $true

 

However, we are interested in doing this using the REST API. Is that possible? Not sure if it matters but in our case, this is for a set of Azure AD B2B users.

3 Replies

You could use the beta API for Azure Active Directory B2B for this.

https://graph.microsoft.com/beta/users/{id of user}

PATCH

"showInAddressList": true

 

Please note, as it is in Beta it could be hazardous to take a production dependency on /beta APIs.

Regards,

Viktor

Mask@ To manage GAL visibility for Azure AD B2B users, you would typically need to use PowerShell or other administrative methods within the Azure or Office 365 portal. You can change the visibility status for a user by modifying their Exchange Online attributes, specifically the "HiddenFromAddressListsEnabled" property.