Overview
This article explains how the DomainClaim setting in M-Files Federated Authentication configuration works. The DomainClaim setting identifies the claim in an ID token that holds the user's domain.
Solution
DomainClaim is used when the ID token provided by an Identity Provider does not contain a single claim that holds both the domain part and the username part of the login name. In this case, the token usually contains the user's username and domain in separate claims, and we need to point out to M-Files which claim to use to find the domain part of the username.
For example:
-Let's say we have the username company\alex.kramer.
-In the authentication token, we have the following claims:
DomainOfUserAccount: company
username: alex.kramer
In this case, we would set "DomainClaim": "DomainOfUserAccount", so that M-Files knows to pick up the domain part of the username from the DomainOfUserAccount claim in the token. In the same example, we would also set "AccountClaim": "username". Then M-Files can parse "DomainOfUserAccount" + "username" = "company\alex.kramer".
For full reference documentation on M-Files options for federated authentication, please refer to the following document:
Configuring OpenID Connect and OAuth 2.0 for M-Files Authentication.pdf
