/// <summary> /// Gets the properties of the specified user. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The user name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <User> GetAsync(this IUsersOperations operations, string deviceName, string name, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(deviceName, name, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets user information from the directory. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='upnOrObjectId'> /// The object ID or principal name of the user for which to get information. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <UserInner> GetAsync(this IUsersOperations operations, string upnOrObjectId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(upnOrObjectId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=email)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <User> GetAsync(this IUsersOperations operations, string resourceGroupName, string labAccountName, string labName, string userName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labAccountName, labName, userName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }