issues with azuread module


  • Hello


    the issue i'm having is with the AzureAD Powershell module.

    I'm a global admin in my own Azure/AD. Have a basic pay as you go account.

    I installed the AzureAD module running 

    Install-Module AzureAD -Scope CurrentUser.

    running "connect-azureAD"

    works and I'm getting my tenant ID

    But I'm getting errors trying to access AD, for example

    PS C:\Users\lebowits> get-azureaddomain
    get-azureaddomain : Error occurred while executing GetDomains 
    Code: Authentication_Unauthorized
    Message: User was not found
    HttpStatusCode: Forbidden
    HttpStatusDescription: Forbidden
    HttpResponseStatus: Completed
    At line:1 char:1
    + get-azureaddomain
    + ~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-AzureADDomain], ApiException
        + FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.GetDomain

    this is the same error across all the get commands there. 

    Can't understand why....I don't get these errors using the azurerm module's commands for AD, but there you can't add users, which is what I'm trying to do

    Sunday, April 2, 2017 4:38 AM


All replies

  • You may refer to this article “Azure Active Directory: connect AAD for management with PowerShell” which addresses similar issues.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Sunday, April 2, 2017 5:15 PM
  • That works (but is extremely unintuitive...). Thanks!
    Tuesday, April 4, 2017 2:50 AM