title: Query on ADLS Gen2 parquet using Synapse ServerLess SQL pool from C#
body: <p>Scenario:
  I have a parquet file on ADLS Gen2, and is able to query via Synapse Serverless Pool.
  I want to use Synapse Serverless pool in C# and execute the query and show result in my c# app.</p>
  <p>Something like:</p>
  <pre><code>static void Main(string[] args)
          {
             string col1; 
             string connString = @&quot; con string for synapse serverlesspool&quot;;
             SqlConnection conn = new SqlConnection(connString);
             try
             {
                  conn.Open();
                  string query = @&quot;SELECT      TOP (10) col1  
                                  FROM OPENROWSET(
                                          BULK 'https:adlsgen2 path/file.parquet',
                                          FORMAT = 'PARQUET'
                                      ) AS [result]
                                  &quot;;
  
                  SqlCommand cmd = new SqlCommand(query, conn);
                  SqlDataReader dr = cmd.ExecuteReader();
                  if (dr.HasRows)
                      {
                          while (dr.Read())
                          {
                              col1= dr.GetString(0);
                               Console.WriteLine(&quot;{0}&quot;, col1);
                          }
                      }
                      else
                      {
                          Console.WriteLine(&quot;No data found.&quot;);
                      }
                      dr.Close();
  
              }
              catch (Exception e)
              {
                  Console.WriteLine(&quot;Error: &quot; + e.Message);
              }
  
              Console.Read();
          }
  </code></pre>
  <p>But when I execute it from C#, it says access denied on the parquet file.</p>
  <blockquote>
  <p>Error: Cannot find the CREDENTIAL 'https:adlsgen2 path/file.parquet',
  because it does not exist or you do not have permission.</p>
  </blockquote>
  <p>I know my Synapse can access the gen2folder, how do I make my C# app access the folder and query in C# via Synapse Serverless pool.</p>
  <p>Thanks</p>