question

DeepakAzure-6296 avatar image
0 Votes"
DeepakAzure-6296 asked ·

AZ login does not work for me inside VM

Login doesn;t work for me inside VM, getting following error. Tried to follow the steps mentioned in various blogs, still can not fix it. I may need your help to resolve this issue. Steps to receate: Create VM in eastus and Login to Windows VM type az login in windows powershell PS C:\Users\msadmin> az login The default web browser has been opened at https://login.microsoftonline.com/common/oauth2/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with az login --use-device-code. You have logged in. Now let us find all the subscriptions to which you have access... The following tenants require Multi-Factor Authentication (MFA). Use 'az login --tenant TENANT_ID' to explicitly login to a tenant. 2d915766-3786-46af-8a38-286bff8cc134 'Default Directory' No subscriptions found.

azure-virtual-machines
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RahulMetangale-9479 avatar image
0 Votes"
RahulMetangale-9479 answered ·

Hi @DeepakAzure-6296

I am assuming when you directly log in to Azure portal from web browser you are able to see subscriptions for which you have access.
Is your account associated with multiple tenants? if yes then try specifying the tenant ID (tenant id can be found under Azure AD- Overview section)
az login --tenant TENANT_ID

I hope this helps

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.