User's manager object is always null when i try to retrieve a user. But i get "objectId", which is the corresponding manager(user) GUID. I can use this GUID to get Manager from API calls or from https://graphexplorer.cloudapp.net but not from Graph Client using C# (even with 2.1.0 version: https://www.nuget.org/packages/Microsoft.Azure.ActiveDirectory.GraphClient).
Can someone guide me on this? Thanks in advance.
Azure Active Directory (Azure AD) Graph is deprecated and will be retired at any time after June 30, 2023, without advance notice, as we announced in September, 2022.
The Microsoft Graph API is a RESTful web API that enables you to access Microsoft Cloud service resources. After you register your app and get authentication tokens for a user or service, you can make requests to the Microsoft Graph API.
We have some datasets available for free or are currently free in preview while other datasets are charged. Microsoft Graph Data Connect offers datasets across multiple different Microsoft 365 products and services.
CosmosDB Graph API is a query language to manage and query "CosmosDB graph database". Graph database unlike traditional databases, store information in the form of a graph (i.e., vertices and edges). GraphQL on the other hand is a query language for a user API.
I just need to add Expand(x=> x.Manager) while getting users.(version: 2.1.0)
Example:
var users = activeDirectoryClient.Users
.Where(user => user.UserPrincipalName.Equals(searchString)).Expand(m => m.Manager)
.ExecuteAsync().Result.CurrentPage.ToList();
var manager = user[index].Manager as User;
Reference: http://blogs.msdn.com/b/aadgraphteam/archive/2014/12/12/announcing-azure-ad-graph-api-client-library-2-0.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With