通过Powershell为AzureAD创建用户时出错 [英] Error while creating user for AzureAD via Powershell
问题描述
在尝试使用网站上提到的命令创建新用户时
"https://docs.microsoft.com/zh-CN/powershell/module/azuread/new-azureaduser?view=azureadps-2.0"
并提供必要的参数,我会遇到以下问题:
处理时出错:为URL创建:/azurescript/Users,退出值:1,输出:Connect-AzureAD:发生一个或多个错误.:AADSTS50034:要登录此\ r \ n应用程序,必须将帐户添加到XXXX目录中.\ r \ n跟踪ID:4e44e39f-76f3-4258-816a-4f8b1d7f5d00 \ r \ n相关性
ID:8235f094-ec2d-43c3-8d94-2c4565b5909c \ r \ n时间戳:2018-09-04 09:26:52Z
While trying to create new user, using the commands mentioned on the website
"https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureaduser?view=azureadps-2.0"
and providing the necessary parameters, I get the following issue:
Error while processing: CREATE for url: /azurescript/Users, Exit Value: 1, output: Connect-AzureAD : One or more errors occurred.: AADSTS50034: To sign into this \r\napplication the account must be added to the XXXX directory.\r\nTrace ID: 4e44e39f-76f3-4258-816a-4f8b1d7f5d00\r\nCorrelation
ID: 8235f094-ec2d-43c3-8d94-2c4565b5909c\r\nTimestamp: 2018-09-04 09:26:52Z
How is this resolved?
推荐答案
msolcred #创建一个用户 New-MsolUser -UserPrincipalName admin01@umbreXX.onmicrosoft.com -DisplayName" admin01" -名字"Peter" -姓氏"Parker"; -Password Password00 -PasswordNeverExpiresmsolcred #Create a User New-MsolUser -UserPrincipalName admin01@umbreXX.onmicrosoft.com -DisplayName "admin01" -FirstName "Peter" -LastName "Parker" -Password Password00 -PasswordNeverExpires
true -AlternateEmailAddresses spiderman@umbreXX.onmicrosoft.comtrue -AlternateEmailAddresses spiderman@umbreXX.onmicrosoft.com输出:-
注意:
如果您还没有 安装了Azure AD PowerShell模块.如果是这样,则可以下载并安装 Microsoft IT专业人员RTW的在线服务登录助手和
If you haven’t installed Azure AD PowerShell module .If so, you can Download and install Microsoft Online Services Sign-In Assistant for IT Professionals RTW and Azure Active Directory Module for Windows PowerShell (64-bit version).
--------------- -------------------------------------------------- ------------------------------
如果此答案有帮助,请单击标记为答案"或投票.要提供有关您的论坛经历的其他反馈,请单击
If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, click here.
这篇关于通过Powershell为AzureAD创建用户时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!