Search code examples
javascriptazure-active-directorymicrosoft-graph-apisharepoint-online

Microsoft Graph API in particular active directory OU


I can find all users with below graph api URL

https://graph.microsoft.com/v1.0/users?$top=500

But it give response with all users of the organization, in which it come with certain service account users. We have all user in some particular OU some thing like this

DC=domainName,DC=local,OU=domainName-HO

So I want to know that is there any way to find users from particular OU


Solution

  • Based on Custom OU considerations and limitations, user accounts, groups, service accounts, and computer objects that you create under custom OUs aren't available in your Azure AD tenant. They don't show up using the Azure AD Graph API or in the Azure AD UI.

    A similar post here for your reference.