Owner permissions API integration guide
This guide shows how to read and change what the technical owners and business owners of an application may do with API calls instead of the application's Settings page. It is for administrators who automate application ownership, or want to. The calls work from any integration that can send an HTTP request, for example a scheduled script, a function app or a CI/CD pipeline.
Overview
On an application's Settings page, an owner decides what technical owners and business owners may do, for example Change certificates and secrets. The owner permissions API reads and changes the same settings, one application per call, without anyone signing in. You read the current permissions, decide which ones to change, and then apply the change. Sending the same values again changes nothing, so the same call can safely run again and again.
To change who the owners are, use the ownership API. It works alongside this one. Run the two for the same application one after the other, not at the same time, and read the permissions again after a change that matters. The Update Owner Permissions page explains why.
Prerequisites
- A Microsoft Entra administrator who can register an application and grant admin consent.
- EasyLife 365 Identity with a Professional license.
- The Object ID of each application you want to manage. Use the Object ID, not the Application (client) ID.
Steps
1. Register an application to call the API
If your integration already synchronizes owners with the ownership API, it already has this permission: skip to step 2. The permission is granted once, to the calling application, and covers every application in the tenant.
- Follow Create Application Registration to register an application for your script or integration, and give it a client secret or certificate.
- Under API permissions, add the Application permission
Identity.Ownership.ReadWrite.Allfrom EasyLife 365 Admin. - Select Grant admin consent.
Grant Identity.Ownership.ReadWrite.All, the same permission that synchronizes owners. It applies to every application in the tenant, so treat the application as a privileged identity and limit who can manage its credentials. Identity.Manage.ReadWrite.All also works, but it also lets the application assign policies, so use it only when your integration needs that too.
2. Find the application's Object ID and type
- In the Microsoft Entra admin center, open the application.
- For an app registration, go to
Applications→App registrations. - For an enterprise application, go to
Applications→Enterprise applications.
- For an app registration, go to
- Copy the Object ID from the Overview page.
- Note the type:
appRegistrationorenterpriseApplication.
An app registration and its enterprise application are two objects with different Object IDs and their own settings. Use the one whose Settings page you want to control.
3. Read the current permissions
Send a Get Owner Permissions request:
GET https://api.easylife365.cloud/admin/identity/v1/apps/{id}/ownership/permissions?type=enterpriseApplication
The answer lists every permission the Settings page shows for that application, each true or false:
"appType": 1,
"technicalOwners": {
"editCredentials": false,
"editOwners": false,
"editTechnicalOwners": false,
"editSettings": true,
"editBusinessOwners": false,
"extendActivity": true,
"editProperties": false
},
"businessOwners": { "editBusinessOwners": false }
Open the application's Settings page in EasyLife 365 Identity and check that the boxes match.
The answer can be sent back to the update request as it is. If you keep the permissions of your applications in source control, save one answer per application and edit it there.
4. Decide what owners may do
Write the request with the permissions you want to change. You do not have to list them all: a permission that is not in the request keeps its current value.
{
"appType": "enterpriseApplication",
"technicalOwners": { "editCredentials": true, "extendActivity": false },
"businessOwners": { "editBusinessOwners": true }
}
See Permission names for what each name means. App registrations do not have extendActivity or editProperties.
5. Apply the change
Send the request as an Update Owner Permissions request:
PATCH https://api.easylife365.cloud/admin/identity/v1/apps/{id}/ownership/permissions
Content-Type: application/json
The answer has "changed": true. Read two parts of it:
changeslists each permission that changed, with itspreviousandnextvalue.permissions.warningslists anything that does not work yet. The most common isEL0006: you grantededitCredentials,editOwnersoreditProperties, but EasyLife 365 Identity is not an owner of the application. Add it as an owner first, as described in the ownership API guide.
A warning describes the permissions after the request, not the request itself. If editCredentials is already granted and EasyLife 365 Identity is not an owner, every run returns EL0006, even one that only revokes extendActivity. Show warnings in your log.
Sending the same values again later is safe: the answer then has "changed": false and an empty changes list, and nothing is recorded.
The PowerShell example does this in one script.
Result
- The application's Settings page shows the new permissions.
- Technical owners and business owners can do what you granted, as if an owner had ticked the boxes. A permission with an
EL0006warning works only once EasyLife 365 Identity is an owner of the application. - When audit logging is turned on for the tenant, each change is in the application's audit history, with the old and new permissions. The calling application is identified by its Application (client) ID. See Logging.
Troubleshooting
| What you see | What it means | What to do |
|---|---|---|
403 Forbidden | The token does not carry Identity.Ownership.ReadWrite.All or Identity.Manage.ReadWrite.All (Identity.Ownership.Read.All can read but not change), or the tenant does not have a Professional or Trial license. | Add the permission, grant admin consent, and request a new token. Check the license in EasyLife 365 Admin. |
404 Not Found | The Object ID does not exist in your tenant, or appType does not match it. | Check that you copied the Object ID, not the Application (client) ID, and that the type is right. |
400 Bad Request, code InvalidPayload | A permission name is misspelled or does not apply to this application type, appType is missing, or a value is null. | Read detail: it names each problem and lists the accepted names. Nothing was changed. |
400 Bad Request with an errors list | The body is empty or not valid JSON, a value is not a JSON true or false (for example the string "true"), or appType is a string that is neither of the two names. | Read errors: each entry names the property that could not be read. Nothing was changed. |
409 Conflict, code Identity.SettingsChangedConcurrently | The application's settings were changed by someone else several times while the request was applied. | Read the permissions again and retry. Nothing was changed. |
Warning EL0006 | The permission is granted but cannot be used until EasyLife 365 Identity owns the application. | Add EasyLife 365 Identity as an owner of the application. |
| The Settings page shows other values later | Someone changed them on the Settings page after your integration ran, or another job that saves the application's settings finished after your call. | If your integration runs again, its next run sets them back. Agree with application owners who controls each permission, and run owner synchronization and permission changes one after the other. |
Security recommendations
- Give this permission only to the application that manages owners and their permissions, and protect its secret or certificate like any administrator credential.
- Treat the application that holds this permission as a privileged identity. It reaches every application in your tenant, with no way to limit it to one, so whoever can change its credentials or its owners can let technical owners manage the credentials and owners of any application EasyLife 365 Identity owns. Limit who owns it. If a CI/CD system calls the API, bind its workload identity to a protected branch or environment, and protect the branch that holds the permission files.
- Turn on audit logging for the tenant before you use the API. Without it, a permission change leaves only EasyLife 365 Identity internal logs, and no entry in the application's audit history.
- Limit who holds the Entra roles that can add a credential to any application, such as Global Administrator, Application Administrator and Cloud Application Administrator, and alert when a credential is added to the applications you manage.
- Use a certificate or workload identity instead of a client secret where you can.
- Keep credentials in a secret store. Never log the access token or the secret.
- If you keep the permissions in source control, review changes to them like any other change to access rights. Merging one changes what owners can do.