|
| 1 | +--- |
| 2 | +title: Application model | Azure |
| 3 | +titleSuffix: Microsoft identity platform |
| 4 | +description: Learn about the process of registering your application so it can integrate with Microsoft identity platform (v2.0). |
| 5 | +services: active-directory |
| 6 | +author: rwike77 |
| 7 | +manager: CelesteDG |
| 8 | + |
| 9 | +ms.service: active-directory |
| 10 | +ms.subservice: develop |
| 11 | +ms.topic: conceptual |
| 12 | +ms.workload: identity |
| 13 | +ms.date: 04/28/2020 |
| 14 | +ms.author: ryanwi |
| 15 | +ms.reviewer: jmprieur, saeeda, sureshja, hirsin |
| 16 | +ms.custom: aaddev, identityplatformtop40, scenarios:getting-started |
| 17 | +#Customer intent: As an application developer, I want to understand how to register an application so it can integrate with Microsoft identity platform |
| 18 | +--- |
| 19 | + |
| 20 | +# Application model |
| 21 | + |
| 22 | +Applications can sign in users themselves or delegate sign-in to an identity provider. This topic discusses the steps that are required to register an application with Microsoft identity platform. |
| 23 | + |
| 24 | +## Registering an application |
| 25 | + |
| 26 | +For an identity provider to know that a user has access to a particular app, both the user and the application must be registered with the identity provider. When you register your application with Azure AD, you are providing an identity configuration for your application that allows it to integrate with Microsoft identity platform. Registering the app also allows you to: |
| 27 | + |
| 28 | +* Customize the branding of your application in the sign-in dialog. This is important because this is the first experience a user will have with your app. |
| 29 | +* Decide if you want to let users sign in only if they belong to your organization. This is a single tenant application. Or allow users to sign in using any work or school account. This is a multi-tenant application. You can also allow personal Microsoft accounts, or a social account from LinkedIn, Google, and so on. |
| 30 | +* Request scope permissions. For example, you can request the "user.read" scope, which grants permission to read the profile of the signed-in user. |
| 31 | +* Define scopes that define access to your web API. Typically, when an app wants to access your API, it will need to request permissions to the scopes you define. |
| 32 | +* Share a secret with Microsoft identity platform that proves the app's identity. This is relevant in the case where the app is a confidential client application. A confidential client application is an application that can hold credentials securely. They require a trusted backend server to store the credentials. |
| 33 | + |
| 34 | +Once registered, the application will be given a unique identifier that the app shares with Microsoft identity platform when it requests tokens. If the app is a [confidential client application](developer-glossary.md#client-application), it will also share the secret or the public key-depending on whether certificates or secrets were used. |
| 35 | + |
| 36 | +Microsoft identity platform represents applications using a model that fulfills two main functions: |
| 37 | + |
| 38 | +* Identify the app by the authentication protocols it supports |
| 39 | +* Provide all the identifiers, URLs, secrets, and related information that are needed to authenticate |
| 40 | + |
| 41 | +Microsoft identity platform: |
| 42 | + |
| 43 | +* Holds all the data required to support authentication at runtime |
| 44 | +* Holds all the data for deciding what resources an app might need to access, and under what circumstances a given request should be fulfilled |
| 45 | +* Provides infrastructure for implementing app provisioning within the app developer's tenant, and to any other Azure AD tenant |
| 46 | +* Handles user consent during token request time and facilitate the dynamic provisioning of apps across tenants |
| 47 | + |
| 48 | +**Consent** is the process of a resource owner granting authorization for a client application to access protected resources, under specific permissions, on behalf of the resource owner. Microsoft identity platform: |
| 49 | + |
| 50 | +* Enables users and administrators to dynamically grant or deny consent for the app to access resources on their behalf. |
| 51 | +* Enables administrators to ultimately decide what apps are allowed to do and which users can use specific apps, and how the directory resources are accessed. |
| 52 | + |
| 53 | +## Multi-tenant apps |
| 54 | + |
| 55 | +In Microsoft identity platform, an [application object](developer-glossary.md#application-object) describes an application. At deployment time, Microsoft identity platform uses the application object as a blueprint to create a [service principal](developer-glossary.md#service-principal-object), which represents a concrete instance of an application within a directory or tenant. The service principal defines what the app can actually do in a specific target directory, who can use it, what resources it has access to, and so on. Microsoft identity platform creates a service principal from an application object through [consent](developer-glossary.md#consent). |
| 56 | + |
| 57 | +The following diagram shows a simplified Microsoft identity platform provisioning flow driven by consent. It shows two tenants: *A* and *B*. |
| 58 | + |
| 59 | +* *Tenant A* owns the application. |
| 60 | +* *Tenant B* is instantiating the application via a service principal. |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +In this provisioning flow: |
| 65 | + |
| 66 | +1. A user from tenant B attempts to sign in with the app, the authorization endpoint requests a token for the application. |
| 67 | +1. The user credentials are acquired and verified for authentication. |
| 68 | +1. The user is prompted to provide consent for the app to gain access to tenant B. |
| 69 | +1. Microsoft identity platform uses the application object in tenant A as a blueprint for creating a service principal in tenant B. |
| 70 | +1. The user receives the requested token. |
| 71 | + |
| 72 | +You can repeat this process for additional tenants. Tenant A retains the blueprint for the app (application object). Users and admins of all the other tenants where the app is given consent keep control over what the application is allowed to do via the corresponding service principal object in each tenant. For more information, see [Application and service principal objects in Microsoft identity platform](app-objects-and-service-principals.md). |
| 73 | + |
| 74 | +## Next steps |
| 75 | + |
| 76 | +For other topics covering authentication and authorization basics: |
| 77 | + |
| 78 | +* See [Authentication vs. authorization](authentication-vs-authorization.md) to learn about the basic concepts of authentication and authorization in Microsoft identity platform. |
| 79 | +* See [Security tokens](security-tokens.md) to learn how access tokens, refresh tokens, and ID tokens are used in authentication and authorization. |
| 80 | +* See [App sign-in flow](app-sign-in-flow.md) to learn about the sign-in flow of web, desktop, and mobile apps in Microsoft identity platform. |
| 81 | + |
| 82 | +To learn more about the application model: |
| 83 | + |
| 84 | +* See [How and why applications are added to Azure AD](active-directory-how-applications-are-added.md) for more information on application objects and service principals in Microsoft identity platform. |
| 85 | +* See [Tenancy in Azure Active Directory](single-and-multi-tenant-apps.md) for more information on single-tenant apps and multi-tenant apps. |
| 86 | +* See [Azure Active Directory B2C documentation](https://docs.microsoft.com/azure/active-directory-b2c) for more information on how Azure AD also provides Azure Active Directory B2C so that organizations can sign in users, typically customers, using social identities like a Google account. |
0 commit comments