title: How to authenticate with Azure Analysis Services from Azure batch and data factory
body: <p>I have a c sharp class library that connects to Azure Analysis Services using the AMO library. </p>
  
  <p>I'd like to use this as part of my data factory pipeline to refresh cube partitions. This is done through Azure batch as a custom .net activity.</p>
  
  <pre><code>var server = new Server();
  server.Connect("Provider=MSOLAP;Data Source=asazure://uksouth.asazure.windows.net/abcd;Initial Catalog=xyz");
  </code></pre>
  
  <p>Running this locally works fine, however this will not run in the cloud. It currently errors out as it is not being run under my user account. I know that I can add a username and password to the connection string, but I would much rather give it some form of authorisation if that is possible.</p>
  
  <p>Are there any other methods for authenticating with Azure Analysis services?</p>