Get-AzRoleAssignment is not showing details in azure automate

minhaj muhammad khan 6 Reputation points
2022-05-28T06:36:36.53+00:00

I am running command Get-AzRoleAssignment is showing me detail of ObjectType as Unknown in azure automate
206287-image.png

Where as if I run directly on cloud shell it gives correct result.
Anyone let me how i can get same result in azure automate.

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,368 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. risolis 8,741 Reputation points
    2022-05-28T20:25:44.423+00:00

    Hello @minhaj muhammad khan

    Thanks for your post.

    I would like to provide the following feedback which is the one below:

    **Get-AzRoleAssignment
    Reference

    Module:
    Az.Resources
    Lists Azure RBAC role assignments at the specified scope. By default it lists all role assignments in the selected Azure subscription. Use respective parameters to list assignments to a specific user, or to list assignments on a specific resource group or resource.
    The cmdlet may call below Microsoft Graph API according to input parameters:

    GET /users/{id}
    GET /servicePrincipals/{id}
    GET /groups/{id}
    GET /directoryObjects/{id}
    POST /directoryObjects/getByIds

    Please notice that this cmdlet will mark ObjectType as Unknown in output if the object of role assignment is not found or current account has insufficient privileges to get object type.**

    The following link shows this detail:

    https://learn.microsoft.com/en-us/powershell/module/az.Resources/Get-azRoleAssignment?view=azps-8.0.0

    Looking forward to your feedback,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.