# ConsulBasedMembershipTable.ReadAllAsync(IConsulClient, string, string?, ILogger, string?, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.clustering.consul/orleans.runtime.membership.consulbasedmembershiptable/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.clustering.consul/orleans.runtime.membership.consulbasedmembershiptable/methods/)

[Source](https://github.com/dotnet/orleans/blob/8bc9fd244427351ad24ccc039a9e7642a42c1cc4/src/Orleans.Clustering.Consul/ConsulBasedMembershipTable.cs#L97)

```csharp
public static Task<MembershipTableData> ReadAllAsync(IConsulClient consulClient, string clusterId, string? kvRootFolder, ILogger logger, string? versionKey, CancellationToken cancellationToken = default(CancellationToken))
```

Reads all membership entries for a cluster from Consul.

### Parameters

- `consulClient` (`IConsulClient`): The Consul client.
- `clusterId` (`string`): The cluster identifier.
- `kvRootFolder` (`string?`): The optional root folder containing Orleans keys.
- `logger` (`ILogger`): The logger.
- `versionKey` (`string?`): The key containing the membership table version, or `null` to use the cluster's default version key.
- `cancellationToken` (`CancellationToken`): A token which cancels the operation.

### Returns

The cluster membership entries and table version.
