title: ADAL and Azure automation
body: <p>I'm trying to call Azure REST Api from Azure Automation so i need to acquire auth header. I use ADAL for it but in Azure Automation it fails with the following.</p>
  
  <p>So the question is - how to use ADAL in Azure Automation?</p>
  
  <blockquote>
    <p>ERROR: Exception calling "AcquireToken" with "4" argument(s): "Unable to find an entry point named 'GetPerAdapterInfo' in DLL 
    'iphlpapi.dll'."
    At C:\Modules\User\azureadauth\azureadauth.psm1:16 char:5
    +     $authResult = $authContext.AcquireToken($resourceAppIdURI, $clien ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : EntryPointNotFoundException</p>
    
    <p>ERROR: You cannot call a method on a null-valued expression.
    At C:\Modules\User\azureadauth\azureadauth.psm1:19 char:5
    +     $authHeader = $authResult.CreateAuthorizationHeader()
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull</p>
  </blockquote>