Get-AzRoleAssignment
列出指定範圍的 Azure RBAC 角色指派。
根據預設,它會列出所選 Azure 訂用帳戶中的所有角色指派。
使用個別的參數來列出特定使用者的指派,或列出特定資源群組或資源的指派。
Cmdlet 可能會根據輸入參數呼叫下列 Microsoft Graph API:
- 取得 /users/{id}
- 取得 /servicePrincipals/{id}
- 取得 /群組/{id}
- 取得 /directoryObjects/{id}
- POST /directoryObjects/getByIds
請注意,如果找不到角色指派的物件,或目前帳戶沒有足夠的許可權來取得物件類型,則此 Cmdlet 會標示 ObjectType 為 Unknown 輸出中。
語法
EmptyParameterSet (預設值)
Get-AzRoleAssignment
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ObjectIdParameterSet
Get-AzRoleAssignment
-ObjectId <String>
[-RoleDefinitionName <String>]
[-ExpandPrincipalGroups]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceGroupWithObjectIdParameterSet
Get-AzRoleAssignment
-ObjectId <String>
-ResourceGroupName <String>
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceWithObjectIdParameterSet
Get-AzRoleAssignment
-ObjectId <String>
-ResourceGroupName <String>
-ResourceName <String>
-ResourceType <String>
[-ParentResource <String>]
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ScopeWithObjectIdParameterSet
Get-AzRoleAssignment
-ObjectId <String>
-Scope <String>
[-RoleDefinitionName <String>]
[-AtScope]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
RoleIdWithScopeAndObjectIdParameterSet
Get-AzRoleAssignment
-RoleDefinitionId <Guid>
[-ObjectId <String>]
[-Scope <String>]
[-AtScope]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceGroupWithSignInNameParameterSet
Get-AzRoleAssignment
-SignInName <String>
-ResourceGroupName <String>
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceWithSignInNameParameterSet
Get-AzRoleAssignment
-SignInName <String>
-ResourceGroupName <String>
-ResourceName <String>
-ResourceType <String>
[-ParentResource <String>]
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ScopeWithSignInNameParameterSet
Get-AzRoleAssignment
-SignInName <String>
-Scope <String>
[-RoleDefinitionName <String>]
[-AtScope]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SignInNameParameterSet
Get-AzRoleAssignment
-SignInName <String>
[-RoleDefinitionName <String>]
[-ExpandPrincipalGroups]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceGroupWithSPNParameterSet
Get-AzRoleAssignment
-ServicePrincipalName <String>
-ResourceGroupName <String>
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceWithSPNParameterSet
Get-AzRoleAssignment
-ServicePrincipalName <String>
-ResourceGroupName <String>
-ResourceName <String>
-ResourceType <String>
[-ParentResource <String>]
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ScopeWithSPNParameterSet
Get-AzRoleAssignment
-ServicePrincipalName <String>
-Scope <String>
[-RoleDefinitionName <String>]
[-AtScope]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SPNParameterSet
Get-AzRoleAssignment
-ServicePrincipalName <String>
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceGroupParameterSet
Get-AzRoleAssignment
-ResourceGroupName <String>
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceParameterSet
Get-AzRoleAssignment
-ResourceGroupName <String>
-ResourceName <String>
-ResourceType <String>
[-ParentResource <String>]
[-RoleDefinitionName <String>]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ScopeParameterSet
Get-AzRoleAssignment
-Scope <String>
[-RoleDefinitionName <String>]
[-AtScope]
[-IncludeClassicAdministrators]
[-SkipClientSideScopeValidation]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
使用 Get-AzRoleAssignment 命令來列出在範圍內有效的所有角色指派。
如果沒有任何參數,此命令會傳回在訂用帳戶下所做的所有角色指派。
您可以使用主體、角色和範圍的篩選參數來篩選此清單。
必須指定作業的主題。
若要指定使用者,請使用 SignInName 或 Microsoft Entra ObjectId 參數。
若要指定安全性群組,請使用 Microsoft Entra ObjectId 參數。
若要指定 Microsoft Entra 應用程式,請使用 ServicePrincipalName 或 ObjectId 參數。
必須使用 RoleDefinitionName 參數來指定要指派的角色。
可以指定授與存取權的範圍。
預設為選取的訂閱。
可以使用下列其中一個參數組合 a 來指定指派的範圍。
範圍 - 這是以 /subscriptions/<subscriptionId> 開頭的完整範圍。
這將過濾在該特定範圍內有效的分配,即該範圍及以上的所有分配。
b。
ResourceGroupName - 訂用帳戶下任何資源群組的名稱。
這會篩選在指定資源群組 c 生效的指派。
ResourceName、ResourceType、ResourceGroupName 和 (選擇性) ParentResource - 識別訂用帳戶下的特定資源,並篩選在該資源範圍有效的指派。
若要判斷特定使用者在訂用帳戶中擁有的存取權,請使用 ExpandPrincipalGroups 參數。
這將列出指派給使用者的所有角色,以及使用者所屬的群組。
使用 IncludeClassicAdministrators 參數來顯示訂用帳戶系統管理員和共同系統管理員。
範例
範例 1
Get-AzRoleAssignment
列出訂用帳戶中的所有角色指派
範例 2
Get-AzRoleAssignment -ResourceGroupName testRG -SignInName john.doe@contoso.com
取得在 testRG 範圍或更高版本中對使用者 john.doe@contoso.com和他所屬群組所做的所有角色指派。
範例 3
Get-AzRoleAssignment -ServicePrincipalName "http://testapp1.com"
取得指定服務主體的所有角色指派
範例 4
Get-AzRoleAssignment -Scope "/subscriptions/96231a05-34ce-4eb4-aa6a-70759cbb5e83/resourcegroups/rg1/providers/Microsoft.Web/sites/site1"
在 'site1' 網站範圍取得角色指派。
範例 5
$ApplicationObject = Get-AzADServicePrincipal -DisplayName 'ApplicationDisplayName'
Get-AzRoleAssignment -ServicePrincipalName $ApplicationObject.AppId
使用 Get-AzAdServicePrincipal 取得指定服務主體的角色指派。
參數
-AtScope
如果指定,則只會列出指定範圍的角色指派,不包括子範圍中的角色指派。
參數屬性
參數集
ScopeWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
RoleIdWithScopeAndObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-DefaultProfile
用來與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ExpandPrincipalGroups
如果指定,則傳回直接指派給使用者及使用者所屬群組的角色 (可轉移方式)。
僅支援使用者主體。
參數屬性
參數集
ObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
SignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-IncludeClassicAdministrators
如果指定,也會列出訂用帳戶傳統系統管理員 (共同系統管理員、服務系統管理員等) 角色指派。
參數屬性
參數集
EmptyParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceGroupWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ScopeWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceGroupWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ScopeWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
SignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceGroupWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ScopeWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
SPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceGroupParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ResourceParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
ScopeParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ObjectId
使用者、群組或服務主體的 Microsoft Entra ObjectId。
篩選對指定主體所做的所有指派。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | 身份識別碼, PrincipalId |
參數集
ObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-ParentResource
使用 ResourceName 參數所指定之資源階層中的父資源。
必須與 ResourceGroupName、ResourceType 和 ResourceName 參數搭配使用。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-ResourceGroupName
資源組名。
列出在指定資源群組有效的角色指派。
與 ResourceName、ResourceType 和 ParentResource 參數搭配使用時,命令會列出資源群組內資源有效的指派。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceGroupWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-ResourceName
資源名稱。
例如,storageaccountprod。
必須與 ResourceGroupName、ResourceType 和 (選擇性) ParentResource 參數搭配使用。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-ResourceType
資源類型。
例如,Microsoft.Network/virtualNetworks。
必須與 ResourceGroupName、ResourceName 和 (選擇性) ParentResource 參數搭配使用。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-RoleDefinitionId
指派給主體之角色的識別碼。
參數屬性
| 類型: | Guid
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
RoleIdWithScopeAndObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-RoleDefinitionName
指派給主體的角色,即讀者、參與者、虛擬網路管理員等。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
EmptyParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithObjectIdParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
SignInNameParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
SPNParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceGroupParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-Scope
角色指派的範圍。
以相對 URI 的格式。
例如,/subscriptions/9004a9fd-d58e-48dc-aeb2-4a4aec58606f/resourceGroups/TestRG。
它必須以 “/subscriptions/{id}” 開頭。
此指令會篩選在該範圍內有效的所有指派。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ScopeWithObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-ServicePrincipalName
服務主體的 ServicePrincipalName。
篩選對指定 Microsoft Entra 應用程式所做的所有指派。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | 服務主體名稱 (SPN), ApplicationId |
參數集
ResourceGroupWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
SPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-SignInName
使用者的電子郵件地址或使用者主體名稱。
篩選對指定使用者所做的所有指派。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | Email, 使用者主要名稱 (UserPrincipalName) |
參數集
ResourceGroupWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ResourceWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
ScopeWithSignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
SignInNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-SkipClientSideScopeValidation
如果指定,請略過用戶端範圍驗證。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸出
備註
關鍵詞:azure、azurerm、arm、resource、management、manager、resource、group、template、deployment