Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

azure - "To sign into this application the account must be added to the domain.com directory"

I'm trying to login to our Azure account from Powershell. I installed the proper module but am unable to get passed the following error:

PS C:> Add-AzureAccount -Credential $cred Add-AzureAccount

AADSTS50034: To sign into this application the account must be added to the domain.com directory. Trace ID: ef487122-88d6-4e36-8421-4434806041d2 Correlation ID: a1ea0ee1-b278-4241-bc48-e213ecd47b27 Timestamp: 2014-11-04 09:46:02Z: The remote server returned an error: (400) Bad Request.At line:1 char:1 + Add-AzureAccount -Credential $cred + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount

I'm new to Azure so I have no idea what or where is this "domain.com" directory. I also failed to find anything even remotely related over the net.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Login at https://manage.windowsazure.com/ and select Subscriptions > Manage subscriptionsdirectory. Each subscription is associated with a particular Azure Active Directory. Select Active Directory from the list of services on the left menu. Open up directory you are interested in. The list of users will say if it is sourced from a Microsoft account or Windows Azure Active Directory. You can only automate signing in to a Azure AD account.

enter image description here

You can create an account by selecting add user and New user in your organization.

enter image description here

I wish I could sign in from the command line without a UI prompt using my Microsoft account. I'm not sure why it is setup this way. But yes, you must currently use a domain account to sign in automatically.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...