Skip to content

Missing config in OAuthOIDC example #2025

Description

@pascalenz

I tried to use OAuth with Azure AD based on this example:
https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/examples/OAuthOIDC/Program.cs

However, when I run that sample code with my own setting values, I receive error:
SASL authentication error: Authentication failed: 1 extensions are invalid! They are: logicalCluster: CLUSTER_ID_MISSING_OR_EMPTY

The Confluent Cloud documentation mentions two additional extension configurations, extension_logicalCluster and extension_identityPoolId.
https://docs.confluent.io/cloud/current/access-management/authenticate/oauth/configure-clients-oauth.html

When I add these two settings to the configuration, it works fine.

var config = new ConsumerConfig
{
    ...,
    SaslOauthbearerExtensions =  "logicalCluster=lkc-abc12,identityPoolId=pool-xyz0"
};

So, it looks like this needs to be added to the sample code, unless there is a way to avoid the need for these additional settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions