/// <summary> /// Gets AD group membership by provided AD object Ids /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='parameters'> /// Objects filtering parameters. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <AADObject> > GetObjectsByObjectIdsAsync(this IObjectsOperations operations, GetObjectsParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetObjectsByObjectIdsWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the details for the currently logged-in user. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AADObjectInner> GetCurrentUserAsync(this IObjectsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetCurrentUserWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets AD group membership by provided AD object Ids /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextLink'> /// Next link for list operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <AADObject> > GetObjectsByObjectIdsNextAsync(this IObjectsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetObjectsByObjectIdsNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets AD group membership for the specified AD object IDs. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextLink'> /// Next link for the list operation. /// </param> public static IPage <DirectoryObject> GetObjectsByObjectIdsNext(this IObjectsOperations operations, string nextLink) { return(operations.GetObjectsByObjectIdsNextAsync(nextLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets the directory objects specified in a list of object IDs. You can also /// specify which resource collections (users, groups, etc.) should be searched /// by specifying the optional types parameter. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='parameters'> /// Objects filtering parameters. /// </param> public static IPage <DirectoryObject> GetObjectsByObjectIds(this IObjectsOperations operations, GetObjectsParameters parameters) { return(operations.GetObjectsByObjectIdsAsync(parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets AD group membership by provided AD object Ids /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextLink'> /// Next link for list operation. /// </param> public static IPage <AADObject> GetObjectsByObjectIdsNext(this IObjectsOperations operations, string nextLink) { return(Task.Factory.StartNew(s => ((IObjectsOperations)s).GetObjectsByObjectIdsNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets AD group membership by provided AD object Ids /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='parameters'> /// Objects filtering parameters. /// </param> public static IPage <AADObject> GetObjectsByObjectIds(this IObjectsOperations operations, GetObjectsParameters parameters) { return(Task.Factory.StartNew(s => ((IObjectsOperations)s).GetObjectsByObjectIdsAsync(parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets the details for current logged in user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static AADObject GetCurrentUser(this IObjectsOperations operations) { return(Task.Factory.StartNew(s => ((IObjectsOperations)s).GetCurrentUserAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets the details for the currently logged-in user. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static AADObject GetCurrentUser(this IObjectsOperations operations) { return(operations.GetCurrentUserAsync().GetAwaiter().GetResult()); }