Looking to have application recognize current system user

0
Hello Developers,   I'm looking for a way to have my application recognize the current system user (example: domain\sysuser). I know I can call $CurrentUser within the application; however, that only pulls in Anonymous-(string of characters). I haven't been able to find anything that allows me to do this without creating some kind of creds within the application.    Summary: Looking to display current system user (domain\sysuser) instead of current application user (anonymous- ....)
asked
2 answers
0

Option A (cloud-friendly): SSO via Azure AD / Okta

  1. Add an SSO module (OIDC or SAML) from the Marketplace.

  2. Configure your IdP (Azure AD/Entra ID, Okta, ADFS).

  3. Map a claim (UPN or sAMAccountName) to the Mendix account name.

  4. On login, $CurrentUser will be the real user; display it anywhere.

Pros: works in Mendix Cloud, standard, secure.Cons: needs IdP setup.

Option B (on-prem with IIS): Windows Auth (Kerberos/NTLM) pass-through

  1. In IIS: enable Windows Authentication, disable Anonymous for your site/reverse proxy.

  2. Configure ARR/URL-Rewrite to forward a header with the Windows user, e.g.X-Remote-User: {REMOTE_USER}

  3. In Mendix: use a Request-Header Authentication module/microflow to read X-Remote-User, auto-create/lookup the Account, and log in.

Pros: true “domain\user” without a login screen on intranet.Cons: IIS required; only suitable for internal networks/browsers that allow IWA

answered
0

Hi Felix,

    Mendix by itself doesn’t know about the Windows system user, it only knows about the Mendix session user $currentUser.  That’s why you see Anonymous

If you want the domain user ( domain\sysuser ), you need to integrate with the identity provider that authenticates Windows logins you can try SAML, OIDC.

 

Regards

Guna P

answered