This page is your starting place for integrating an application with the UW Entra ID. This page contains links to related pages which will assist you with the integration process, as well as guidelines to help you determine if integrating with Entra ID is the right choice. Integrating a web application with Entra ID can be very simple, slightly involved, or complex depending on the scenario. This guide covers most of the possibilities to to be comprehensive but for that reason it can appear very daunting. Here are some reasonable guidelines about the difficulty level, depending on your scenario:
I have… | Expected difficulty level |
Vendor provided web application which has an Entra ID application gallery template | Easy |
Web application which uses SAML | Easy |
Web application which uses OpenID | Intermediate |
Web application which uses OpenID & OAuth2 | Complex |
Native or mobile app which uses OpenID | Intermediate |
Native or mobile app which uses OpenID & OAuth2 | Complex |
Any scenario which involves SCIM based user provisioning | Complex |
As with all tasks, experience makes a difference, and what may be easy for one person may be difficult for another. In all cases, UW-IT is happy to assist, so feel free to reach out. NOTE: This page is incomplete. Content is expected to be finished by 7/28/2023. [accordion name='Entra ID Application Integration Guide topics'] [section title='Picking the right identity provider integration solution'] Web applications can be integrated with UW NetIDs and the UW Groups service via a variety of methods, including Entra ID and UW Shibboleth. UW Shibboleth and Entra ID are both generally recommended. Guide to which UW Identity Provider your web application should prefer:
Web app ... | UW Entra ID | UW Shibboleth |
requires use of SAML or OIDC |
X |
X |
requires use of WS-Federation or WS-Trust protocols |
X |
|
requires the OAuth protocol |
X |
|
requires integration with Office 365 or other Entra ID apps |
X |
|
requires user provisioning via the SCIM protocol |
X |
|
has an Entra ID application gallery template |
X |
|
requires support team access to app sign in logs |
X |
|
requires custom terms of use |
X |
|
requires Research and Scholarship category support |
X |
|
requires custom IdP metadata |
X |
|
requires multilateral SAML federation |
X |
|
requires support for social identities such as Facebook |
X |
|
requires broadest possible set of identity providers |
X |
|
requires better user experience via sign in only when required |
X |
|
requires group claims for member-private groups |
X |
|
requires claims involving confidential data |
X |
|
requires simple conditional access controls such as: -group membership -IP address |
X |
X |
requires advanced conditional access controls including: -location (IP, GeoRegion, or GPS) -device platform -client application -client device state -sign in risk -application specific restrictions |
X |
|
requires stronger fraud protections such as: -behavior analytics to flag risky signs in such as: atypical travel, unknown/suspect locations, patterns matching known compromised account signatures -detection of publicly leaked credentials -high volume of daily security signals |
X |
[/section] [section title='Scenario based checklists for Entra ID app integration']
Symbols reference
[/section] [section title='Overview of the process'] The process of integrating a web application varies greatly depending on the specific application. There are two cases in general:
In general, these are the steps taken:
[/section] [section title='Entra ID Application Terminology'] Microsoft has a few terms which can be a bit confusing if you don't understand what they mean:
[/section] [section title='Entra ID Application Concepts'] Most of the content here is also represented at https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-how-applications-are-added. Because everyone learns information slightly differently, you may find one or the other easier to understand.
[/section] [section title='Entra ID Applications: Azure Portal Navigation'] This content is at Entra ID Applications: Azure Portal Navigation [/section] [section title='Entra ID Application Creation'] If your application is pre-integrated, it will be listed in the Entra ID application gallery. To proceed, contact UW-IT to get started via help@uw.edu with a subject line of “Entra ID application: X” where X is the name of the application. The application object created via this process will be pre-configured to work correctly. You will supply key information and possibly take actions during the process to achieve the final configuration. Otherwise, you should be able to create the application object yourself. Microsoft has a guide to this process here: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app. [/section] [section title='Entra ID Application Configuration: Intro'] This basic configuration section covers the basic required elements which must be configured for an Entra ID application. If you are integrating a web application with Entra ID, there are several key pieces of information that are required to get your web application to actually use UW Entra ID. Which information is needed depends on the protocol your web application uses, but there are some general pieces of information that are useful across all of them. What information a given application will need can vary, however, there are a couple pieces of information which are almost always useful.
You may be asked to supply your tenant ID -- this can sometimes be called the Entra ID tenant ID, Office 365 tenant ID, or Microsoft 365 tenant ID. All of these names mean the same thing. Tenant ID: f6b6dd5b-f02f-441a-99a0-162ac5060bd2
Modern web applications integrate via one or more endpoints that an identity provider supplies, each of which supports a specific protocol and has different expected authentication flows associated with it. Microsoft identity provider endpoints generally have the following syntax:
Where {tenant} specifies which accounts are allowed and can have one of 5 values:
Where {protocol} specifies which protocol endpoint and may have additional specifics. The following are the most common:
More information about Microsoft endpoint URLs can be found at https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-client-application-configuration. [/section] [section title='Entra ID Application Configuration: SAML '] For SAML, you’ll likely need:
where you supply the appId specific to the Entra ID service principal. For example: https://login.microsoftonline.com/f6b6dd5b-f02f-441a-99a0-162ac5060bd2/federationmetadata/2007-06/federationmetadata.xml?appid=dd67ec83-9784-44ca-b640-4efe95399fb8 NOTE: do not use this URL–you need the one specific to your application.
[/section] [section title='Entra ID Application Configuration: OIDC and OAuth'] For OIDC and OAuth, the platform for your application alters the basic requirements. If you are using OIDC/OAuth with delegated permissions, you *must* have a Redirect URI--this is the only way a user can get to the code your application identity is using. If you are using OIDC/OAuth with application permissions, the Redirect URI may not be necessary because no human needs to interact with your application identity. For Web and single-page applications (SPA) you’ll need:
For iOS/MacOS, you will need:
For Android, you will need:
For mobile and native clients, you will need:
In all cases, the Entra ID service principal will need:
In all cases, the software configuration will need:
See https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#send-the-sign-in-request for more details on what the OIDC software must send.
Note: OAuth2 supports a variety of access flows. Additional information may be required or recommended for those flows.
[/section] [section title='Entra ID Application Configuration: More details'] https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols has a more complete explanation of the required configuration information so if you are confused, it may provide the answers you seek. If you are writing your own application, you may want to review the OIDC flow, OAuth2 flow and SAML flow depending on which protocols you are leveraging. [/section] [section title='Entra ID Application Configuration: User Assignment'] To ensure that the desired end users have access to your Entra ID application, you need to assign the application to them. Pre-requisites:
There are many ways to assign applications, including by user, by group, and by access packages.
NOTE: Nested groups do not receive access to an Entra ID application. NOTE: If you are provisioning users to your application via SCIM, then you must use group based assignment.
Because assigning by group is the simplest and most common option, we only cover it.
First, find the service principal under Enterprise Applications: Follow these steps to find a service principal under Enterprise Applications:
Tip: Unlike App Registrations there is no "Owned application" tab, which lets you find applications for which you are an owner quickly. You may find it quicker to use App Registrations > Owned applications > Your app and use the "Go to Enterprise applications" button to get to the right service principal object within Enterprise Applications.
Next, add the assignment(s):
[/section] [section title='Entra ID Application Configuration: Verify basic connectivity'] Once both the Entra ID application and your software has the required information configured, you can test that it works properly. For SAML applications, the Single sign-on page has a “Test” button. Click on it to initiate an IdP initiated authentication to your application. For OIDC applications, there isn’t an automated way to test. You’ll need to verify basic authentication by having your software send a token request and seeing if it gets back a successful response. [/section] [section title='Entra ID Application Advanced Configuration: Claims'] The default SAML claims provided by Entra ID are:
If you need more claims, you’ll need to add them. Entra ID sources all data for claims from Entra ID itself. This means the possible claims you can add are restricted to data which is present in UW Entra ID. Entra ID supports a wide variety of data transformations and conditions for claims issuance. https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-saml-claims-customization documents the basic process of adding claims, including transformation and condition capabilities. https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-enterprise-app-role-management covers application-specific role-based claims. This allows you to assign a role within your application based on claims data. If you have written your own application, see https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-add-app-roles-in-azure-ad-apps for a more detailed description. If you have written your own application, then you have an Entra ID application object, and you may want more control over what claims are provided. You can use the application manifest (e.g. via the Application Registration interface) to do that. https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims discusses this topic. If you need claims which rely on group membership data, we have strong recommendations. When configuring your “Group Claim”, choose the 'Groups assigned to the application' option. This will ensure that users who are members of a lot of groups do not get an extremely large access token filled with groups which are not relevant to your application. To make this option work, you only need to assign the relevant groups to your application. See ‘User Assignment’. If you can’t assign all the relevant groups to your application, then use the Advanced options to filter which groups are included in claims for your application. https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims provides detailed information relevant to configuring group claims. [/section] [section title='Entra ID Application Advanced Configuration: Scopes'] Your application (usually an API) may need to define permissions for the purpose of allowing other applications the ability to leverage OAuth consent to take actions on behalf of another user. This is an advanced topic and we’d recommend you talk with UW-IT about your goals and how to best achieve them. https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-expose-web-apis#add-a-scope covers the process of creating a hypothetical OAuth scope for an example application. https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-oauth2 covers the process of both setting up a scope and having a 2nd application leverage the scope of the 1st. https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent is a comprehensive introduction to OAuth scopes which are sometimes called API permissions or OAuth consent. [/section] [section title='Entra ID Application Advanced Configuration: Consent'] Your application may need to take advantage of well-known OAuth scopes (permissions) that other applications have published as available for use with consent. These can only be added to applications whose application object lives in the UW Entra ID, i.e. application objects which you own. You can add these to the application manifest or via the App Registrations interface’s API permissions screen. Note that scopes which are of type ‘Admin’ will require UW-IT authorization, presuming a valid business need and adequate risk mitigations. [/section] [section title='Entra ID Application Advanced Configuration: Provisioning (SCIM)'] The Entra ID application identity is a bridge between the software providing the application's functionality and the Entra ID users who might use that software. Via User Assignment, you determine which user accounts are allowed to access the software via the identity integration, but via User Assignment you don't actually make any configuration change to the software itself. Lots of software, especially Software as a Service (SaaS), include the idea of an instantiation of each user within the software's configuration. This allows the software to customize the user experience by storing special information about the user, such as profile information, special access roles, and more. When the software has a local instantiation of each user, it tends to approach this one of three ways:
Entra ID application provisioning refers to automatically creating user identities and roles in the applications that users need access to. In addition to creating user identities, automatic provisioning includes the maintenance and removal of user identities as status or roles change. If your application is pre-integrated, it may also support SCIM provisioning. In that case, there will be instructions on how to get it setup. If an application supports SCIM provisioning, you use the Enterprise Applications, Provisioning section to configure it & the Enterprise Applications, Provisioning logs section to review activity and troubleshoot. If your application is not pre-integrated, there are several possible paths depending on the scenario:
There are a few gotchas:
For more information about how to add SCIM support to your application to achieve provisioning, see https://docs.microsoft.com/en-us/azure/active-directory/app-provisioning/. [/section] [section title='Entra ID Application Advanced Configuration: Conditional Access'] Conditional Access (CA) is a powerful feature that allows security controls to be enforced at the time an access token is requested based on a variety of conditions. UW support for Conditional Access is limited at this time. If you feel you need a CA policy, send a request and we’ll consider it. Conditional Access can lead to significant unexpected impacts, so we have to exercise judicious vetting and practices to prevent undesirable outcomes. Also note that many of the CA conditions possible may not be viable. A summary of the options is represented in this grid:
Assignments | |
Users and groups | Include | Exclude |
Cloud apps | Include | Exclude |
User actions | |
Register security information | |
Conditions | |
Sign-in risk (Entra ID Identity Protection, via Entra ID P2) | High | Medium | Low | No risk |
Note: Typical risks are atypical travel, unusual login, malware linked ip, leaked creds, known attack pattern | |
Device platforms | Include | Exclude |
Locations | Include | Exclude |
Client apps | Browser | Mobile apps and desktop clients | Modern authentication clients | Exchange ActiveSync clients | Other clients |
Device State | Include | Exclude, where {Device Hybrid Entra ID joined, Device marked as compliant} |
Access controls | |
Block access | |
Grant access | Require Multi-Factor Authentication |
Require device to be marked as compliant | |
Require Hybrid Entra ID Joined device | |
Require approved client app | |
Require app protection policy | |
Terms of Use | |
Require one of the selected controls | |
Require all of the selected controls | |
Session | Use app enforced restrictions |
Use Conditional access app control (Cloud App Security, via M365 A5) See https://docs.microsoft.com/en-us/cloud-app-security/proxy-intro-aad & https://docs.microsoft.com/en-us/cloud-app-security/session-policy-aad | |
Sign-in frequency | |
Persistent browser session |
Conditional Access is an extensive topic, with more information available at https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/overview. Developers may find https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-conditional-access-dev-guide useful. [/section] [/accordion]