Share via

Microsoft Graph client use DirectorySearcher object to search and perform queries against an Active Directory Domain Services

Kalra, Priyanka 1 Reputation point
2022-02-22T08:21:05.607+00:00

Hi Team,

I have registered application in the Azure Portal and have Client ID, Tenant ID & Client Secret details and using that I can create an instance of a Microsoft Graph client with an authentication provider

Could you please let us know if Microsoft Graph client can use DirectorySearcher object to search and perform queries against an Active Directory Domain Services

IConfidentialClientApplication confidentialClientApplication = ConfidentialClientApplicationBuilder
.Create(clientId)
.WithTenantId(tenantId)
.WithClientSecret(clientSecret)

            .Build();

        ClientCredentialProvider authProvider = new ClientCredentialProvider(confidentialClientApplication);
        GraphServiceClient graphClient = new GraphServiceClient(authProvider);
Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.