'How to find list of enterprise applications which an AD group can access

Is there a way through which we can find the list of Enterprise Applications which an AD group can access?

I see the option in the Azure Portal which lets me see this, but there's no AzCLI or Terraform module which can list this down.

Picture for reference in the Azure Portal



Solution 1:[1]

Found a command in PowerShell for reference - would still await for any alternatives if possible.

Get-AzureADGroupAppRoleAssignment -ObjectId <objectId>. ObjectID can be found from the Group in Azure AD, or we can use the following to get the data:

$GroupId = Get-AzureADMSGroup -SearchString "<groupName>" | Select-Object Id -ExpandProperty Id
Get-AzureADGroupAppRoleAssignment -ObjectId $GroupId 

Requires Install-Module AzureAD and Connect-AzureAD to be executed before running this.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mukund Bajaj