title: Get-AzureADApplication throwing error while fetching Azure AD application details
body: <p>I am trying to fetch Azure AD app details using Get-AzureADApplication command.
  But this command is throwing below error.</p>
  
  <p>"<strong>Get-AzureADApplication : You must call the Connect-AzureAD cmdlet before calling any other cmdlets.
  At D:\Scripts\Test.ps1:18 char:10
  + $myApp = Get-AzureADApplication -Filter "DisplayName eq '$($AppName)' ...
  +          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [Get-AzureADApplication], AadNeedAuthenticationException
      + FullyQualifiedErrorId : Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthenticationException,Microsoft.Open.AzureAD16.PowerShell.GetApplication</strong>"</p>
  
  <p>Worst part is this command was working few days back and today while executing the script. I am getting this error.
  I also referred below mentioned link but not able to find solution.</p>
  
  <p><a href="https://stackoverflow.com/questions/51704100/error-while-fetching-aad-app-information-using-get-azureadapplication">Error while fetching AAD app information using Get-AzureADApplication</a></p>