Connect-AzAccount prompt issue

1.2k Views Asked by At

When I use Connect-AzAccount a prompt is opened in a browser like window(cannot ascertain which browser it is). It follows along correctly until it reaches organization's login page. And then the submit button is not working. There is also a 3rd party authentication which is supposed to follow but we have not reached there yet.

Now if I give Connect-AzAccount -Credential $Credential -Subscription $subscription (without prompt) then I get the error "The security token could not be authenticated or authorized.".

How to fix this?

2

There are 2 best solutions below

0
On BEST ANSWER

The submit button was not working. So the solution was to press 'Enter' key while the cursor was on password text.

0
On

Please try this:

$Credential = Get-Credential
$Tenant = 'xxxx-xxxx-xxxx-xxxx'
$Subscription = 'yyyy-yyyy-yyyy-yyyy'
Connect-AzAccount -Credential $Credential -Tenant $Tenant -Subscription $Subscription