Thank you for posting this in Microsoft Q&A.
As I understand you want help in getting roles assigned to groups using PowerShell.
You can follow below steps to do the same,
To successfully complete this assignment using PowerShell, make sure you have the required prerequisites:
- Microsoft Graph PowerShell SDK is installed. Follow the Install the Microsoft Graph PowerShell SDK guide to install the SDK.
- To use the Microsoft Entra Privileged Identity Management, you must have one of the following licenses:
- Microsoft Entra ID P2
- Enterprise Mobility + Security (EMS) E5 license
- Microsoft Graph PowerShell using a Global Administrator role and the appropriate permissions. For this tutorial, the
RoleManagement.ReadWrite.Directory
delegated permission is required. To set the permissions in Microsoft Graph PowerShell, run; Connect-MgGraph -Scopes "RoleManagement.ReadWrite.Directory"
Select Consent on behalf of your organization before accepting in the sign-in dialog box.
Post this you can follow below article to make the group eligible for role assignment.
Follow the same article to extend, activate, deactivate and removing eligible assignments using PowerShell.
Let me know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.