Compartilhar via


Graph API updates: api-version=1.6 and a new Graph client library

Api-version 1.6

The Azure AD Graph team is very pleased to announce the availability of the next version of Azure AD Graph REST API, api-version=1.6. There are no major changes from 1.5 to 1.6.

So you might ask why we’ve revved the version here.  In March of this year, we made some changes to the 1.5 API, believing that these were non-breaking changes.  However, due to an issue with a Graph client library dependency, this service side change caused a breaking change in the Graph client library (versions 2.0.5 and earlier).  We were forced to roll back the service side change, and pause any API changes on the service side.  More details can be found in this stack overflow question.

Since March, we’ve:

  1. introduced more validation testing gates before releasing new client libraries and
  2. introduced a fix in Graph client library version 2.0.8 that allows updates to the Graph REST API without breaking the client (by ignoring any unknown collections)

Now we’re releasing a new API version – api-version=1.6 – that will allow our team to release additional directory functionality and capabilities through the Graph REST API, without breaking any existing clients (2.0.6 and earlier).  As usual, you can try it out through Graph Explorer.

We will document the version changes through our regular MSDN documentation channels in our versioning document, as well as within our interactive reference documentation.

A new Azure AD graph client library

As part of this update, we’ll also be releasing graph client library version 2.1.0.  Versions 2.1.x will be tied to REST API version 1.6 (while graph client library 2.0.x will be
tied to REST API version 1.5).

We’ll be updating the graph client library on a regular basis to make new functionality (and bug fixes) available to developers who prefer to use a client library vs pure REST API calls.

You can find the latest .Net (portable) client library on nuget.org here.

Feedback

We’re always interested to hear what you think, so please let us know if you have any feedback or suggestions for the Graph API or client library.

Comments

  • Anonymous
    August 12, 2015
    Hello, I am using the Azure AD graph client library and want to retreive the manager of a specific user. When I use the graph explorer and put that URL : graph.windows.net/.../manager I have a result. but when I try my code it return Null ... did I'm doing something wrong ? Thanks ! here is my function : public static List<GraphUser> GetSearchManagerByEmail(string UPN)         {             List<GraphUser> returndata = new List<GraphUser>();             Uri serviceRoot = new Uri(serviceRootURL);             ActiveDirectoryClient adClient = new ActiveDirectoryClient(                 serviceRoot,                 async () => await GetAppTokenAsync());             try             {                 IUser user = adClient.Users.Where(u => u.UserPrincipalName == UPN).ExecuteSingleAsync().Result;                 IDirectoryObject userManager = user.Manager;                     if (userManager != null)                     {                         User manager = userManager as User;                         if (manager != null)                         {                             returndata.Add(new GraphUser                             {                                 FirstName = manager.GivenName,                                 LastName = manager.Surname,                                 Name = manager.DisplayName,                                 Phone = manager.TelephoneNumber,                                 CellPhone = manager.Mobile,                                 EmailAddress = manager.UserPrincipalName,                                 JobTitle = manager.JobTitle,                                 Branch = manager.PhysicalDeliveryOfficeName,                                 MailingAddress = manager.StreetAddress,                                 PostalCode = manager.PostalCode,                                 City = manager.City                             });                         }                     }                 return returndata;             }             catch (Exception e)             {                 Console.WriteLine(e.Message);                 Console.WriteLine(e.InnerException.Message);                 List<IUser> users = new List<IUser>();                 return returndata;             }         }

  • Anonymous
    August 12, 2015
    Hi Azure Graph team, Could you please tell me whether I can use the batch processing for linking member and a group? if yes can you please give me an example where i can pass 20 request in an array kind regards, Nandhini

  • Anonymous
    September 04, 2015
    Hi, is there a way to update "mobile" attribute in a user profile using azure graph api? Why do I receive "insufficient privileges to complete the operation" error? What is a difference between "mobile" and "telephoneNumber" attribute? Best regards, aszka

  • Anonymous
    December 15, 2015
    Is there any reference documentation for the client library? I've searched and can only find blog posts and samples. Specifically, I want to know if it's possible to enumerate all the users of a group, including users who are in some group that is contained within the group I'm interested in. Obviously, I can recursively enumerate groups, but I want to know if there is a better/more efficient approach. Thanks!

  • Anonymous
    January 11, 2016
    Hello, Azure AD Development Team!  I have a very simple question.  Are there plans to allow the following type of statement? IPagedCollection<IUser> pagesOfUsers = await client.Users.Where(user => (!String.IsNullOrEmpty(user.DisplayName) && user.DisplayName.Contains(searchTerm))).ExecuteAsync(); Syntactically this does not complain but this statement throws a NotSupportedException when run.  As far as I can tell, this is due to a limit on what types of filters are allowed and the Contains method is not one of the currently allowed filters.  StartsWith would work, though.  Are there plans to implement the other Enumerable LINQ operations? Thanks, Jordan