# DefaultChannelIdMapper.GetGrainKeyId(GrainBindings, ChannelId)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.broadcastchannel/orleans.broadcastchannel.defaultchannelidmapper/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.broadcastchannel/orleans.broadcastchannel.defaultchannelidmapper/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.BroadcastChannel/IdMapping/DefaultChannelIdMapper.cs#L21-L47)

```csharp
public IdSpan GetGrainKeyId(GrainBindings grainBindings, ChannelId streamId)
```

Get the [GrainId](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.grainid/) which maps to the provided [ChannelId](/orleans/docs/api/csharp/microsoft.orleans.broadcastchannel/orleans.broadcastchannel.channelid/)

### Parameters

- `grainBindings` (`GrainBindings`): The grain bindings.
- `streamId` (`ChannelId`): The stream identifier.

### Returns

The [GrainId](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.grainid/) component.
