Skip to content

Connect-AzAccount #27941

Open
Open
@Rupsa5517

Description

@Rupsa5517

Description

Connect-AzAccount : DeviceCodeCredential authentication failed: Retry failed after 4 tries. Retry settings can be
adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy.
Could not find tenant id for provided tenant domain 'b8975b80-d2c5-4e2d-a2a3-7bcb41bf140d'. Please ensure that the
provided user is found in the provided tenant domain.
At line:1 char:1

  • Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -De ...
  •   + CategoryInfo          : CloseError: (:) [Connect-AzAccount], ArgumentNullException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
    
    

Issue script & Debug output

This out put I am getting after giving my Subcription id, tenent id and resource group.
Can anyone please check why this error is coming.

Environment data

PS C:\Users\Administrator>  $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.26100.3624
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.3624
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

PS C:\Users\Administrator> Get-Module Az*

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     4.0.2      Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear...

Error output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedneeds-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions