【发布时间】:2017-10-31 13:58:27
【问题描述】:
我正在尝试使用 Azure Active Directory Powershell 2.0 模块创建一个新的 AzureAD 应用程序,但是在调用 New- AzureADApplication 我收到 HTTP Bad requset 并出现以下错误。
+ New-AzureADApplication -DisplayName "Umbraco-domea" -IdentifierUris $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADApplication], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.NewApplication
我通过谷歌搜索发现了以下 github 问题,但是即使在我的 cmdlet 调用中包含 -IdentifierUris,我仍然会收到错误消息。
New-AzureADApplication -DisplayName $displayName -IdentifierUris $URIs -GroupMembershipClaims "SecurityGroup" -ReplyUrls @($Live",$Dev,"http://localhost:4198/")
【问题讨论】:
-
尝试包含 -Debug 标志,您可能会在那里看到确切的错误。
-
不会对错误的输出产生影响:/
-
嗯,您也可以尝试使用 Fiddler 检查流量。
-
这是我使用的一个示例:github.com/Azure-Samples/powerbi-powershell/blob/master/… 它专门用于 PowerBI,因此可能无法直接应用,但请注意它使用 native 应用程序,因为 powershell 是一个客户端应用程序,并且另请注意,重定向 URI 是
urn:ietf:wg:oauth:2.0:oob。这可能是一个完整的红鲱鱼,或者它可能会给你其他地方看看
标签: powershell azure powershell-2.0 azure-active-directory azure-ad-powershell-v2