-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Labels
AuthorizationAzure PS TeambugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
Description
Description
The ToPSRoleAssignment()
method takes a role assignment object returned from Azure and gathers extra information from Microsoft Graph to enrich the model for display in PowerShell.
azure-powershell/src/Resources/Resources/Models.Authorization/AuthorizationClientExtensions.cs
Line 70 in 8e96a77
public static PSRoleAssignment ToPSRoleAssignment(this RoleAssignment assignment, AuthorizationClient policyClient, ActiveDirectoryClient activeDirectoryClient, string scopeForRoleDefinition = null) |
It takes a priority order like the following for determining ObjectType
:
- Live Active Directory object type (most current)
- Cached principal type from the assignment (fallback)
- "Unknown" type (when AD lookup fails)
However, when an exception occurs in the ToPSRoleAssignment() method, the ObjectType will be "Unknown", not the cached principal type.
Copilot
Metadata
Metadata
Assignees
Labels
AuthorizationAzure PS TeambugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.