/// <summary> /// Returns a list of capacities the user has access to. /// </summary> /// <remarks> /// <br/>**Required scope**: Capacity.Read.All or Capacity.ReadWrite.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Capacities> GetCapacitiesAsync(this ICapacitiesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetCapacitiesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }