1
我試圖按照Microsoft網站(https://docs.microsoft.com/en-us/azure/active-directory/active-directory-configurable-token-lifetimes)上的說明配置自定義令牌到期策略。New-AzureADPolicy:執行NewPolicy時發生錯誤
但是我收到一個難以理解的錯誤消息。這似乎不是一個暫時的錯誤,因爲我在過去幾天嘗試了幾次。
我已經嘗試運行Powershell作爲正常和「作爲管理員」,它對結果沒有任何區別。
PS C:\WINDOWS\system32> Connect-AzureAD -Confirm
Confirm
Are you sure you want to perform this action?
Performing the operation "Connect-AzureAD" on target "Establishing a PowerShell session connected to {0} environment.".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
Account Environment TenantId TenantDomain
------- ----------- -------- ------------
[email protected] AzureCloud 64b6bf97-8bef-49b5-b986-6fa47c6cce08
PS C:\WINDOWS\system32> New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime」:」1.0
:00:00」,」MaxInactiveTime」:」90.00:00:00","MaxAgeMultiFactor":"365.00:00:00","MaxAgeSingleFactor」:」365.00:00:00"}}') -Dis
layName 「MYTESTApps」 -IsOrganizationDefault $false -Type "TokenLifetimePolicy"
New-AzureADPolicy : Error occurred while executing NewPolicy
Code: InternalServerError
Message: Unable to resolve User Id
InnerError:
RequestId: bbf7b26d-3cfe-493d-9eb6-cafb9606085d
DateTimeStamp: Thu, 04 May 2017 10:25:44 GMT
HttpStatusCode: InternalServerError
HttpStatusDescription: Internal Server Error
HttpResponseStatus: Completed
At line:1 char:1
+ New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADPolicy], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.MSGraphBeta.Client.ApiException,Microsoft.Open.MSGraphBeta.PowerShell.New
Policy
PS C:\WINDOWS\system32>
謝謝,我看不到,我可以創建在Azure的門戶網站本地蔚藍廣告管理員帳戶? –
有關如何創建天藍色廣告用戶的信息,請參閱此鏈接(https://docs.microsoft.com/zh-cn/azure/active-directory/active-directory-users-create-azure-portal)爲該用戶添加簽名'Global administrator'角色以進行測試。 –
@ NanYu-MSFT:我收到了一個類似的錯誤,但我有雙重檢查。我是全球管理員,但仍然有問題。 – immysl