ADFS Multiple Domain configuration steps - Simple guide

1. ADD a new domain to AAD domain in Azure Portal or O365 Portal.

2. Add 3rd O365 RP claim rule in ADFS management
- For Multiple Forest
c:[Type == "https://schemas.xmlsoap.org/claims/UPN"] => issue(Type = "https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid", Value = regexreplace(c.Value, ".+@(?<domain>.+)", "https://${domain}/adfs/services/trust/"));

- For Multiple UPN/Sub-domain
c:[Type == "https://schemas.xmlsoap.org/claims/UPN"] => issue(Type = "https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid", Value = regexreplace(c.Value, "^.*@([^.]+\.)*?(?<domain>([^.]+\.?){2})$", "https://${domain}/adfs/services/trust/"));

3. Update-MsolFederatedDomain -DomainName org_domain_name -SupportMultipleDomain

4. Convert-MsolDomainToFederated -DomainName seanth.tk -SupportMultipleDomain