Applies to Product - Power Platform Administration
What’s happening?
The customer is seeking assistance with a specific Message Center Item, requesting a comprehensive list of recipients for the notifications associated with it. The customer has multiple environments and is looking for a solution that does not require checking each environment individually.
Reason:
The upcoming changes to message center notifications for Dynamics 365 and Power Platform administrators indicate that only users assigned with Microsoft 365 administrator or Power Platform administrator roles will receive these notifications. This change has raised concerns about the impact on environments that include numerous administrators.
Resolution:
To retrieve a list of System Administrators for all environments, the customer should implement the following PowerShell script:
# Define parameters
$roleName = "System Administrator"
$environmentUrl = "https://your-environment-url"
# Get users with the specified role assignment
Get-UsersWithRoleAssignment -roleName $roleName -environmentUrl $environmentUrl
Ensure that the Microsoft.PowerApps.Administration.PowerShell module is installed and imported. The following commands can be used to install and import the module:
# Install the Power Platform Administration module
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -AllowClobber -Force
# Import the module
Import-Module -Name Microsoft.PowerApps.Administration.PowerShell
After the module is installed and imported, the customer can use cmdlets like Get-AdminPowerAppRoleAssignment to get role assignments.
For further guidance, refer to the Microsoft documentation Programmability and Extensibility - PowerShell - Getting started - Power Platform | Microsoft Learn.
