Managing external identities to enable secure access for partners, customers, and other non-employees
so I have access to both tenants:
- Partners tenant - main tenant
- Company tenant - our external tenant
Partner main tenant:
- I've created new enterprise application with option: "Integrate any other application you don’t find in the gallery (Non-gallery)"
- I've enabled "SAML-based Sign-on"
- For "Basic SAML Configuration" I've set up:
- Identifier (Entity ID) [which if not overridden should be set as audience]: https://login.microsoftonline.com/<company-external-tenant-id>/
- Reply URL (Assertion Consumer Service URL): https://<company-external-tenant-id>.ciamlogin.com/login.srf
- For "Attributes & Claims" I've set up:
- New "NameID Format" with fix value "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" has been added.
- "Append application ID to issuer" has been enabled.
- Partner domain is MS verified but just to be sure TXT DNS record has been added with value:
"DirectFedAuthUrl=https://login.microsoftonline.com/<partner-main-tenant-id>/saml2" - "Test single sign-on" is passing
- I've downloaded "Federation Metadata XML" file to "partner-sso.xml" file.
Company external tenant:
- I've create app registration:
- "WEB SSO - Single tenant":
- Supported account types: Accounts in this organizational directory only (Sonata One NonProd Customers only - Single tenant)
- Redirect URI: Web -> https://jwt.ms
-
- "WEB SSO - Multitenant":
- Supported account types: Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant)
- Redirect URI: Web -> https://jwt.ms
- "WEB SSO - Multitenant":
- "WEB SSO - Single tenant":
- I've added SAML configuration through Azure Portal: "External identities" -> "All identity providers" -> "Custom" -> "Add new"
- Display name: Partner name
- Identity provider protocol: SAML
- Domain name of federating IdP: <partner-domain> (MS Verified)
- Select a method for populating metadata: Parse metadata file
- Metadata file: "partner-sso.xml" generated in previous step
- Issuer URI (populate automatically from file): https://sts.windows.net/<partner-main-tenant-id>/
- Passive authentication endpoint (populate automatically from file): https://login.microsoftonline.com/<partner-main-tenant-id>/saml2
- Certificate (populate automatically from file): <certificate>
- After pressing "Save" I got prompt: "This domain is Microsoft Entra ID verified. You will need to configure cross-tenant access inbound settings for users to sign in with SAML/Ws-Fed identity provider instead of Microsoft Entra ID." which is weird because Cross-tenant collaboration is not available in External tenant.
- In "Users flows" I've created new "Company-user-flow" for: "Sign up and sign in"
- Identity providers:
- Email accounts: Email with password
- Other Identity Providers: "Saml/Ws-Fed" with <partner-name>
- User attributes - left unchanged (default)
- Custom authentication extensions - left unchanged ("None selected" for all)
- Applications. I've added two created in step 1:
- WEB SSO - Single tenant
- WEB SSO - Multitenant
- Identity providers:
After running user flow "Run user flow" for both apps I am getting same result:
- No additional button with new Sign In options available
- After providing email address: my-email@<partner.domain> I've received message: "We couldn't find an account with this email address."
- After selecting "No account? Create one" and providing same address, code has been sent.
- At any point I haven't been redirected to partner branded login page, at all time I had our company branding displayed
- If I upload same file with "Issuer URI" pointing different url (non Microsoft), additional Sign in button appears and after selecting it I am redirected to external IdP