我登錄到爲創建測試而創建的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小時後試過了,還是一樣的錯誤 –