Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
The new and improved Power Platform admin center is now generally available. We're currently updating the documentation to reflect these changes, so check back to ensure that you're getting the latest updates.
[This article is pre-release documentation and is subject to change.]
Use this endpoint to create an application user in a target environment. Callers of this endpoint must either be Power Platform administrators or a Power Platform Service Principal application.
Authentication
For more information about permissions and how to select them, see Authentication - legacy.
HTTP request
Authorization: Bearer eyJ0eXAiOi...
Host: api.bap.microsoft.com
Accept: application/json
POST https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/{environmentIdGuid}/addAppUser?api-version=2020-10-01
Request headers
Header | Value |
---|---|
Authorization | Bearer {token} (required) |
Content-Type | application/json |
Request body
{
"servicePrincipalAppId": "AzureAD_App_Registration_ClientID"
}
Response
The response is always a 200 OK response, unless you aren't correctly authenticated.
Example
{
"servicePrincipalAppId": "9995c1c2-619a-4b72-9ee6-4c44f5f586c5"
}
After performing this action, you can confirm that the service principal from your Microsoft Entra tenant was added to the environment as an application user. This can be validated by going to the Power Platform admin center, select Environments > [select an environment] > Settings > Users + permissions > Application users. This always adds the application user as a System Administrator.