我登录到为创建测试而创建的Azure AD。我试图扩展属性添加到用户:通过Power Shell向Azure ActiveDirectory用户添加扩展属性
我第一次添加的扩展型到我的应用程序: 命令:
New-AzureADApplicationExtensionProperty -ObjectID 513aba62-4610-44ef-8be2-5a5e99a5e6bd -DataType "string" -Name "organisationId"
结果:
extension_d939d34ab3f34f5dbb6e4e5c35e5787a_organisationId
的ObjectId应用:513aba62-4610- 44ef-8be2-5a5e99a5e6bd
然后我检索扩展属性的ID: 命令:
Get-AzureADApplicationExtensionProperty -ObjectId 513aba62-4610-44ef-8be2-5a5e99a5e6bd
现在我想在本扩展活动目录添加到我的第一个用户:
$User = Get-AzureADUser -Top 1
Set-AzureADUserExtension -ObjectId $User.ObjectId -ExtensionName extension_d939d34ab3f34f5dbb6e4e5c35e5787a_organisationId -ExtensionValue "12345"
错误:
Set-AzureADUserExtension : Error occurred while executing SetUser
Code: Request_BadRequest Message: The following extension properties
are not available for the given resource:
extension_d939d34ab3f34f5dbb6e4e5c35e5787a_organisationId. RequestId:
2cbeff0f-5b91-478a-8c64-586a4d23e4c5 DateTimeStamp: Wed, 14 Jun 2017
13:49:02 GMT HttpStatusCode: BadRequest HttpStatusDescription: Bad
Request HttpResponseStatus: Completed At line:2 char:1
+ Set-AzureADUserExtension -ObjectId $User.ObjectId -ExtensionName exte ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-AzureADUserExtension], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD.Graph.PowerShell.Custom.SetAzureADUserExtension
你要足够长,它传播?像10-15分钟? – 4c74356b41
我现在在2小时后试过了,还是一样的错误 –