Applies to Product – Microsoft Dataverse
What’s happening?
Customers encounter errors when attempting to deploy solutions in Power Platform using GitHub actions, specifically related to the service principal not having the necessary permissions to access the target environment.
Reason:
The service principal with the specified ID for the application does not have permission to access the required resources in the target environment. This often occurs when the application user is not onboarded into the target environment or lacks the appropriate security role.
Resolution:
- Ensure that the application user is added to the target environment.
- Assign the "System Administrator" security role to the application user in the target environment.
- Execute the following PAC command to register the service principal: pac admin application register -id [SPN's AppId]
- Validate the solution deployment after assigning the required security role to the app user. If the deployment fails, check the permissions granted to the Microsoft Entra application user and ensure they have the necessary privileges.
