Single sign-on for an enterprise app
Set up SAML or OIDC SSO for a sample app with assignment, consent review, SCIM provisioning and certificate tracking.
By Invicly Tech, , in Microsoft Entra & Microsoft 365 Administration. About 12 minutes to read.
In short
Enterprise applications in Microsoft Entra ID are the service principals of apps your users sign in to, such as a SaaS tool from the app gallery. You configure single sign-on (SSO) with SAML or OIDC so users sign in with their Entra account, decide who may use the app through assignment, review what permissions were consented, and can provision accounts automatically with SCIM. SAML apps also depend on a signing certificate that expires and must be renewed on time.
Think of it like this: SSO is a staff badge accepted by every partner office: the office trusts the badge issuer instead of keeping its own list of passwords.
Explained simply
Most companies use dozens of online tools: payroll, chat, design, ticketing. Without single sign-on (SSO), each has its own password, and when someone leaves you must remember to close every account. With SSO, the app trusts Microsoft Entra ID to sign users in, so one account, one set of security rules and one place to switch access off.
In Entra, each of these apps appears as an enterprise application. Many popular apps are in the app gallery with ready-made settings. For others, you create your own application and enter the details by hand.
SSO usually uses SAML or OpenID Connect. Both do the same job: Entra checks the user, then sends the app a signed message saying who they are. The app checks the signature and lets them in. You copy a few values between Entra and the app so they recognise each other.
Two more jobs complete the setup. Assignment decides who may use the app. Provisioning with SCIM creates and removes accounts in the app automatically, so a new hire has access on day one and a leaver loses it straight away. Finally, SAML apps rely on a certificate that expires, so someone must watch the date.
Press Play on a diagram to walk through it one step at a time.
- User to SaaS app: Open the app1Open the app
- SaaS app to User: Redirect with a SAML request2Redirect with a SAML request
- User to Entra ID: Sign in, Conditional Access, assignment check3Sign in, Conditional Access, assignment check
- Entra ID to User: Signed SAML response with claims4Signed SAML response with claims
- User to SaaS app: Post response to the reply URL (ACS)5Post response to the reply URL (ACS)
- SaaS app to User: Check signature; open session6Check signature; open session
- 1Monitoring
Sign-in and provisioning logs, certificate expiry
- 2Provisioning
SCIM creates and disables accounts
- 3Assignment
Only assigned groups can sign in
- 4Conditional Access
MFA or device rules for the app
- 5SSO
SAML or OIDC trust with Entra
In depth
Adding the app and choosing SAML or OIDC
In the Entra admin center go to Entra ID, Enterprise apps, New application. Search the gallery first; gallery entries pre-fill SSO settings and often support provisioning. If the app is not listed, choose Create your own application and the option for a non-gallery app.
Pick the protocol the app supports. Use OIDC for modern web apps; it is built on an app registration, so you set a redirect URI and the app reads an ID token. Use SAML when the vendor only offers SAML, which is common for business SaaS. Some gallery apps use other methods, such as password-based SSO, where Entra stores and fills credentials; treat that as a last resort.
Lab note: you need a tenant (a free trial works) and a test app. For SAML without a real vendor, a design-only walkthrough with a synthetic metadata file teaches the same fields.
Configuring SAML SSO
Open the app, choose Single sign-on, then SAML. Box 1 holds the app's Identifier (Entity ID), Reply URL (Assertion Consumer Service URL), and optional Sign on URL and Relay State. The vendor gives you these, often in a metadata file you can upload. Box 2 holds Attributes and Claims: by default the NameID is the user principal name, plus email and name claims. Match what the app uses as its unique user key.
Box 3 holds the SAML signing certificate; download the Federation Metadata XML or the certificate. Box 4 lists Entra's Login URL and Microsoft Entra Identifier, which you paste into the app's SSO settings. Then use Test single sign-on with a test user. Evidence: the user lands signed in, and the sign-in log shows the app with status success.
- Step 1App to Entra
Entity ID and Reply URL (ACS)
- Step 2Entra claims
NameID and attributes the app expects
- Step 3Entra to app
Login URL, Entra Identifier, signing certificate
- Step 4Test
Test single sign-on with a pilot user
Assignment and consent review
Under Properties, set Assignment required to Yes. Then only users and groups listed under Users and groups can sign in or get tokens; everyone else gets an error saying they are not assigned. Assign groups rather than individuals so joiners and leavers flow through group membership. Group assignment needs Microsoft Entra ID P1, and nested group membership is not used for assignment.
Set Visible to users to control whether the app shows in My Apps. For OIDC or apps that call Graph, open the Permissions tab to review what was consented, by whom, and whether the access is delegated or application. Remove grants the app does not need. Review assignments on a schedule, or with access reviews if you have P2 or Entra ID Governance.
- Assignment required = Yes
- Assign groups, not people
- Group assignment needs P1; nested groups are ignored
- Review the Permissions tab for consent grants
Provisioning with SCIM
SSO signs users in, but the account in the app may still need to exist. Automatic provisioning uses SCIM, a standard REST API the app exposes, to create, update and disable accounts. In the app's Provisioning page, set the mode to Automatic, enter the app's SCIM tenant URL and secret token from the vendor, and test the connection.
Attribute mappings say which Entra fields fill which app fields, and scoping says whether to sync only assigned users and groups. Use Provision on demand to push one test user and read the step-by-step result. The first cycle processes everyone in scope, then incremental cycles run about every 40 minutes. When a user is unassigned or disabled, the next cycle disables them in the app. Provisioning logs show each action and any errors.
- 1Assigned
User or group added to the app
- 2Create
SCIM POST creates the account
- 3Update
Changed attributes sent by PATCH
- 4Unassigned or disabled
Next cycle detects it
- 5Deactivate
Account disabled in the app
- Back to step 1
Tracking signing certificate expiry
Entra signs SAML responses with a certificate that, when created in the portal, is valid for three years by default. When it expires, sign-ins break for everyone. Under SAML Certificates, add notification email addresses, ideally a shared team mailbox rather than one person, so reminders arrive before expiry.
To roll over: create a new certificate in Entra, but do not make it active yet. Send the new certificate or updated metadata to the app, or upload it yourself if the app allows two certificates. At an agreed time, make the new certificate active in Entra, test sign-in, then remove the old one. If the app accepts only one certificate, schedule a short window and update both sides together. Keep an inventory of SAML apps with their expiry dates.
Learn it in 5 short steps
About 35m each. Track them with a timer in your plan.
- 1Add an enterprise app~35m
- 2Configure SAML or OIDC SSO~35m
- 3Assign users and groups~35m
- 4Provision with SCIM~35m
- 5Track signing certificate expiry~35m
Key points
- Add gallery apps from the Entra app gallery, or create your own non-gallery app for anything else.
- SAML needs matching Identifier (Entity ID) and Reply URL (ACS) on both sides; OIDC apps use an app registration and redirect URI.
- Set Assignment required to Yes so only assigned users and groups can sign in.
- SCIM provisioning creates, updates and disables accounts in the app based on assignments and attribute mappings.
- Track SAML signing certificate expiry: add notification emails and roll the certificate before it expires.
Key terms
Tap a card to flip it. 0/5 known
Examples
Connecting a fictional ticketing app with SAML
Contoso adds HelpNest, a fictional non-gallery ticketing app. Step 1: Create your own application, name HelpNest (lab). Step 2: from HelpNest's admin page copy Entity ID https://helpnest.example.com/saml and ACS https://helpnest.example.com/saml/acs into Box 1. Step 3: keep NameID as user.userprincipalname. Step 4: download the certificate and paste the Login URL and Entra Identifier into HelpNest. Step 5: set Assignment required to Yes and assign HelpNest-Users. Evidence: a test user reaches HelpNest signed in; an unassigned user gets an AADSTS50105 not assigned error. Rollback: switch HelpNest back to local login and delete the app.
Building a certificate expiry inventory
You want one list of every SAML signing certificate and its end date so none surprise you. The script below reads service principals with SAML SSO and their key credentials, then sorts by end date. Run it monthly, or turn it into an alert for anything expiring within 60 days.
Connect-MgGraph -Scopes "Application.Read.All"
Get-MgServicePrincipal -All |
Where-Object PreferredSingleSignOnMode -eq "saml" | ForEach-Object {
$sp = $_
$sp.KeyCredentials | Where-Object Usage -eq "Verify" | ForEach-Object {
[pscustomobject]@{ App = $sp.DisplayName; Ends = $_.EndDateTime;
DaysLeft = ($_.EndDateTime - (Get-Date)).Days }
}
} | Sort-Object EndsQuick reference
- Add apps in Entra ID, Enterprise apps, New application; check the gallery first
- SAML needs Entity ID and Reply URL (ACS) to match exactly on both sides
- Set Assignment required to Yes and assign groups, not individuals
- AADSTS50105 = user is not assigned to the app
- SCIM cycles: full first run, then incremental about every 40 minutes
- Use Provision on demand to test one user and read each step
- Portal-created SAML signing certificates last three years by default
- Add a shared mailbox to certificate notification emails
Common mistakes
- Leaving Assignment required set to No, which lets every user in the tenant sign in to the app.
- Letting the SAML signing certificate expire, which breaks sign-in for everyone at once.
- Mapping the wrong unique identifier claim, so users get duplicate or mismatched accounts in the app.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
List enterprise apps in a lab tenant that do not require assignment.
- Exercise 2medium
Configure a non-gallery SAML app with placeholder values, assign one group, and record the evidence of a blocked unassigned user. You may do this design-only if you lack a test app.
- Exercise 3hard
Plan a SAML signing certificate rollover for an app that accepts only one certificate, with a timeline, communication, test steps and rollback.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Do I need a paid licence for enterprise app SSO?
- Basic SSO for gallery and custom apps is available on the free tier for user assignments. Group-based assignment and Conditional Access for apps need Entra ID P1; access reviews need P2 or Entra ID Governance.
- SAML or OIDC: which should I choose?
- Use whatever the app supports best. For apps you build, use OIDC. For SaaS vendors that offer only SAML, SAML is fine and well supported.
- Does SSO remove the need for provisioning?
- Not always. Some apps create accounts at first sign-in, but they cannot disable them when someone leaves. SCIM provisioning handles creation and removal.
- What if the app does not support SCIM?
- Check whether the vendor offers another import, use an API with a script, or keep a manual joiner and leaver checklist and review assignments regularly.