Basic Authentication via C#


I have a dremio service up and running and I’ve also created a user account for myself. Whenever I try to query the service, I am declined due to unauthentication. I was wondering the correct way of querying the service by using the username and password that I created for my account.


I forgot to mention that I am using the c# arrow flight library

Passing in a grpc core metadata instance with the following values did the trick for me

String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(“ISO-8859-1”).GetBytes(username + “:” + password));
var headers = new Metadata
{ “Authorization”, "Basic " + encoded() },

Hi @lfcosio We are also trying to connect to dremio end point using Apache Arrow Flight C# library. We are trying out the following code but unable to connect:

String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(“ISO-8859-1”).GetBytes(“user_name” + “:” + “password”));
var credentials = CallCredentials.FromInterceptor((context, metadata) =>
metadata.Add(“Authorization”, "Basic " + encoded);
return Task.CompletedTask;
GrpcChannel channel = GrpcChannel.ForAddress(“dremio_url”, new GrpcChannelOptions
Credentials = ChannelCredentials.Create(new SslCredentials(), credentials)
FlightClient client = new FlightClient(channel);
while (await actions.ResponseStream.MoveNext(default))

Can you please share a sample code snippet to connect to dremio using C# arrow flight and execute a sample query if you managed to get it working?

@Gandhirajan Have asked internally for someone from engineering to respond, it seems this is the same as Apache Arrow flight C# implementation code to connect to Dremio