New-AzManagedServicesAuthorizationObject
建立授權的記憶體內部物件。
語法
New-AzManagedServicesAuthorizationObject
-PrincipalId <String>
-RoleDefinitionId <String>
[-DelegatedRoleDefinitionId <String[]>]
[-PrincipalIdDisplayName <String>]
[<CommonParameters>]
Description
建立授權的記憶體內部物件。
範例
範例 1:建立新的 Azure Lighthouse 授權物件以搭配註冊定義使用
New-AzManagedServicesAuthorizationObject -PrincipalId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -RoleDefinitionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -PrincipalIdDisplayName "Test user"
DelegatedRoleDefinitionId PrincipalId PrincipalIdDisplayName RoleDefinitionId
------------------------- ----------- ---------------------- ----------------
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Test user xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
建立新的 Azure Lighthouse 授權物件,以搭配註冊定義使用。
範例 2:使用 delegatedRoleDefinitionIds 建立新的 Azure Lighthouse Authorization 物件
New-AzManagedServicesAuthorizationObject -PrincipalId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -RoleDefinitionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -PrincipalIdDisplayName "Test user" -DelegatedRoleDefinitionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
DelegatedRoleDefinitionId PrincipalId PrincipalIdDisplayName RoleDefinitionId
------------------------- ----------- ---------------------- ----------------
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Test user xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
使用 delegatedRoleDefinitionIds 建立新的 Azure Lighthouse 授權物件。
參數
-DelegatedRoleDefinitionId
當 roleDefinitionId 參考使用者存取系統管理員角色時,需要 delegatedRoleDefinitionIds 字段。 這是角色定義標識碼清單,可定義授權中使用者可以指派給其他主體的所有許可權。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-PrincipalId
Azure Active Directory 主體的標識符。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-PrincipalIdDisplayName
Azure Active Directory 主體的顯示名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-RoleDefinitionId
Azure 內建角色的標識符,定義 Azure Active Directory 主體將在投影範圍上擁有的許可權。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |