/// <summary> /// Add a memeber to a group. (see /// http://msdn.microsoft.com/en-us/library/azure/dn151600.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations. /// </param> /// <param name='groupObjectId'> /// Required. Group object id /// </param> /// <param name='parameters'> /// Required. Member Object Url as /// https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse AddMember(this IGroupOperations operations, string groupObjectId, GroupAddMemberParameters parameters) { return Task.Factory.StartNew((object s) => { return ((IGroupOperations)s).AddMemberAsync(groupObjectId, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Add a memeber to a group. Reference: /// https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/groups-operations#AddGroupMembers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupObjectId'> /// Group object id /// </param> /// <param name='parameters'> /// Member Object Url as /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AddMemberAsync(this IGroupsOperations operations, string groupObjectId, GroupAddMemberParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { await operations.AddMemberWithHttpMessagesAsync(groupObjectId, parameters, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Add a memeber to a group. Reference: /// https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/groups-operations#AddGroupMembers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupObjectId'> /// Group object id /// </param> /// <param name='parameters'> /// Member Object Url as /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd /// </param> public static void AddMember(this IGroupsOperations operations, string groupObjectId, GroupAddMemberParameters parameters) { Task.Factory.StartNew(s => ((IGroupsOperations)s).AddMemberAsync(groupObjectId, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Add a member to a group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupObjectId'> /// The object ID of the group to which to add the member. /// </param> /// <param name='parameters'> /// The URL of the member object, such as /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. /// </param> public static void AddMember(this IGroupsOperations operations, string groupObjectId, GroupAddMemberParameters parameters) { operations.AddMemberAsync(groupObjectId, parameters).GetAwaiter().GetResult(); }
/// <summary> /// Add a memeber to a group. (see /// http://msdn.microsoft.com/en-us/library/azure/dn151600.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations. /// </param> /// <param name='groupObjectId'> /// Required. Group object id /// </param> /// <param name='parameters'> /// Required. Member Object Url as /// https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> AddMemberAsync(this IGroupOperations operations, string groupObjectId, GroupAddMemberParameters parameters) { return(operations.AddMemberAsync(groupObjectId, parameters, CancellationToken.None)); }
/// <summary> /// Add a memeber to a group. (see /// http://msdn.microsoft.com/en-us/library/azure/dn151600.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations. /// </param> /// <param name='groupObjectId'> /// Required. Group object id /// </param> /// <param name='parameters'> /// Required. Member Object Url as /// https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse AddMember(this IGroupOperations operations, string groupObjectId, GroupAddMemberParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IGroupOperations)s).AddMemberAsync(groupObjectId, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Add a memeber to a group. (see /// http://msdn.microsoft.com/en-us/library/azure/dn151600.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations. /// </param> /// <param name='groupObjectId'> /// Required. Group object id /// </param> /// <param name='parameters'> /// Required. Member Object Url as /// https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task<AzureOperationResponse> AddMemberAsync(this IGroupOperations operations, string groupObjectId, GroupAddMemberParameters parameters) { return operations.AddMemberAsync(groupObjectId, parameters, CancellationToken.None); }