Could not find ADLA Account in any resource group - DataLakeStoreGen1


  • I am trying to check whether the DataLake Analytics account State is active or not with the below power shell script through Service Principal authentication. Application is given the access to datalake analytics account. And it is present in one of the resource groups in my subscription. When I am trying to run the below command, I am getting the error that analytics account is not present in any resource group.But I am seeing this error only some times but not always. I dont think this behavior is due to network issues as script was running fine earlier.

    Note: I am seeing this error after the existing DataLakeStore and Analytics accounts have become Gen1. Can some one help me why I am getting this error?

    System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials;
    Login-AzureRmAccount -ServicePrincipal -TenantId 'Tenant'  -ApplicationId 'ApplicationID' -CertificateThumbprint  'Certificate' -ErrorAction Stop > $null ; 
    $Status = Get-AzureRmDataLakeAnalyticsAccount -Name 'ADLAccount'
    -ErrorAction Stop -ErrorVariable ErrorStatus;
    if($Status.State -ne 'Active'){
    Write-Error ('Error Occurred while connecting to DataLake analytics account::ADLAAccount');}
    Write-Error ($_.Exception.Message +';'+ $_.InvocationInfo.PositionMessage);
     : Could not find account: 'ADLAAccount' in any resource group in the 
    currently selected subscription: subscriprionID. Please 
    ensure this account exists and that the current user has access to it.;At 'AppID' -CertificateThumbprint 'Thumbprint' -ErrorAction Stop > $null ;

    Thursday, July 12, 2018 8:16 AM

All replies

  • Was the same script working fine before?
    Thursday, July 12, 2018 10:33 PM
  • It is the same script. It was working fine earlier
    Friday, July 13, 2018 10:46 AM
  • I am able to execute the command successfully. It might be one of the following:

    1. The access might have been revoked

    2. The resource might have been deleted. Please check if data lake analytics with that resource name is present.

    Tuesday, July 17, 2018 8:46 PM
  • Also make sure if your service principal is set up correctly and has the right level of access permissions.
    Tuesday, July 17, 2018 8:51 PM
  • VairavanS (Azure) Access has not been revoked and resource is not deleted. Kind of this error I am seeing only sometimes but not always. I thought the issue was due to network. But I am connected to network as I am able to run other commands
    Tuesday, July 17, 2018 8:51 PM
  • I have right level of access permissions. Service principle was set up correctly. 
    Tuesday, July 17, 2018 8:55 PM
  • I believe this needs direct trouble shooting to find out the issue. Do you have a plan to create a technical support ticket?
    Wednesday, July 18, 2018 6:46 PM
  • We created support ticket and support team is currrently looking into it. If you have any observations on root cause and possible fix, please provide in the mean time.
    Friday, July 20, 2018 11:49 AM