title: In Azure DevOps pipelines, how do I login to AZ CLI using the service principle details returned from the addSpnToEnvironment parameter?
body: <p>I essentially have to run a Python script that has AZ CLI commands baked into the script and get spawned as processes from the <code>subprocess</code> module. In order for these commands to run, I need to be logged in to AZ CLI.</p>
  <p>I have a AZ CLI task in my pipeline of which setting the <code>addSpnToEnvironment = true </code> provides me the <code>$env:servicePrincipalId</code>, <code>$env:servicePrincipalKey</code> and <code>$env:tenantId</code>. My question is, how can I use these details to now sign in to AZ CLI so that the context is maintained in the task and the AZ CLI commands in my Python script recognize this and can execute?</p>