title: ADAL in Azure Automation: Type not loading intermittantly
body: <p>I'm working on an Azure Automation script where I need to retrieve an access token to call the AAD Graph API.  I wanted to use ADAL to do this so I zipped up <code>Microsoft.IdentityModel.Clients.ActiveDirectory.dll</code> and uploaded it as a module.  When I run from the test blade, it sometimes works, and sometimes fails with this error:</p>
  
  <pre><code>New-Object : Cannot find type [Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredential]: verify that the 
  assembly containing this type is loaded.
  At line:22 char:9
  + $cred = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredent ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
      + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
  </code></pre>
  
  <p>When it fails I just run it again and it works.  Now I've published and scheduled this runbook as a daily job 3 days ago.  So far it has failed every day with this same error.</p>
  
  <p>Has any one else seen this?  Any suggestions on next steps?</p>