Service Principal vs App Registration: Key Differences
In this article
A service principal is the local identity an application uses to sign in and act in a specific tenant, while the app registration is the global definition of that application in Microsoft Entra ID. In short: the app registration is the blueprint, and the service principal is the working copy that gets permissions and signs in. You need both to let an app access resources like Microsoft Graph, Azure subscriptions, or SharePoint.
What You'll Need
- Access to the Microsoft Entra admin center (or Azure portal) with at least the Application Administrator or Cloud Application Administrator role to create app registrations.
- Permission to grant admin consent if the app needs tenant-wide permissions.
- A clear idea of which API or resource the app must access (for example Microsoft Graph, Azure Resource Manager, or a custom API).
Step-by-Step
- Create an app registration. In the Microsoft Entra admin center, go to Identity > Applications > App registrations and select New registration. Give it a name, choose the supported account types (single tenant or multitenant), and optionally add a redirect URI. This object lives in your tenant and defines the app's identity, credentials, and API permissions. Labels can differ slightly by version or region, but the path is stable.
- Note the Application (client) ID and Directory (tenant) ID. These are on the app registration's Overview page. The client ID identifies the application globally; the tenant ID identifies the directory where the service principal will be created.
- Create a client secret or certificate. Under Certificates & secrets, add a client secret (or upload a certificate). Copy the secret value immediately; it is shown only once. This credential is used by the app to authenticate.
- Add API permissions. Under API permissions, add the permissions the app needs (for example Microsoft Graph > Application permissions > User.Read.All). Then select Grant admin consent if you have the rights. These permissions are requested by the app registration but are granted to the service principal in the tenant.
- Understand when the service principal is created. A service principal is created automatically in your tenant when you register an app there. If the app is multitenant, a service principal is created in each tenant where an admin or user consents to the app. You can also create a service principal for an existing multitenant app using the Enterprise applications blade or PowerShell (New-MgServicePrincipal).
- Assign roles to the service principal. For Azure resources, go to the Azure portal > Subscriptions (or a resource group) > Access control (IAM) > Add role assignment, and select the service principal as the member. For Microsoft Graph or other APIs, use the app registration's API permissions (which surface on the enterprise application). The service principal is the object that actually receives role assignments and consent.
- Verify the difference in the portals. App registrations shows the global definition (client ID, redirect URIs, secrets, API permissions). Enterprise applications shows the service principal (sign-in logs, users and groups assigned, conditional access, provisioning). The same app appears in both places but represents different objects.
- Use the service principal to authenticate. In code or a tool, authenticate with the client ID, tenant ID, and client secret (or certificate). The token is issued to the service principal in that tenant. The app registration itself never signs in; it is only the definition.
Common Mistakes
- Confusing the app registration with the service principal when assigning permissions. API permissions are configured on the app registration, but admin consent and role assignments apply to the service principal in the tenant.
- Deleting the app registration and expecting the service principal to remain. Deleting the app registration removes the associated service principal in that tenant, breaking any integrations.
- Creating a service principal in the wrong tenant. A multitenant app needs a service principal in each tenant where it is used; the app registration exists only in the home tenant.
- Assuming a client secret is tied to the service principal. Secrets and certificates are defined on the app registration and are used by all service principals of that app.
- Forgetting that user assignment can be required. If the enterprise application has "Assignment required?" set to Yes, users or groups must be assigned before they can sign in, even if the app registration allows it.
Tips
- Use the Enterprise applications blade to audit sign-ins, review consent, and configure SSO or provisioning for the service principal.
- Prefer certificates over client secrets for production apps; secrets expire and must be rotated.
- Grant the least privilege: assign only the API permissions and Azure roles the app truly needs.
- Document which app registration maps to which service principal, especially in multitenant scenarios.
- Use PowerShell or Microsoft Graph to list service principals and their app registrations when managing many apps.
Troubleshooting
- App cannot sign in: Check that the client ID and tenant ID are correct, the secret has not expired, and the service principal exists in the tenant. In Enterprise applications, confirm the app is enabled for users.
- Insufficient privileges after granting permissions: Ensure admin consent was granted on the app registration and that the service principal has the required Azure role assignment. Token caching can delay changes; request a new token.
- Service principal missing in a tenant: For multitenant apps, an admin must consent to the app in that tenant, which creates the service principal. Use the admin consent URL or the Enterprise applications > New application flow.
- Cannot delete app registration: Remove the service principal first if it was created manually, or delete the app registration which removes the service principal automatically. Check for owned objects or role assignments that block deletion.
- Permissions appear on the app registration but not on the service principal: API permissions are defined on the app registration; the service principal inherits them after consent. If consent is missing, the service principal will not have the effective permissions.
Frequently Asked Questions
Can a service principal exist without an app registration?
Yes, for multitenant apps or managed identities. A service principal can be created in a tenant for an app registered elsewhere, or for a managed identity which has no app registration.
Does deleting the app registration delete the service principal?
In the home tenant, deleting the app registration removes the associated service principal. In other tenants, the service principal may remain until removed separately.
Where do I assign Azure RBAC roles?
Assign roles to the service principal, not the app registration, because the service principal is the identity that accesses Azure resources.
Are client secrets stored on the service principal?
No, secrets and certificates are part of the app registration. The service principal uses them to authenticate but does not store them.
How do I find the service principal for an app?
In the Microsoft Entra admin center, go to Enterprise applications and search by the app's name or application ID. The object ID shown is the service principal ID.
Can I have multiple service principals for one app registration?
Yes, one per tenant where the app is consented. Each service principal has its own object ID and can have different permissions and assignments.