Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Unable to sign in after registering and activating accounts #14

Open
PotentEngineer opened this issue Aug 15, 2019 · 7 comments
Open

Unable to sign in after registering and activating accounts #14

PotentEngineer opened this issue Aug 15, 2019 · 7 comments

Comments

@PotentEngineer
Copy link

We are just setting the EMSLP up in our PROD environment and cannot get any user to sign in.

"We couldn't sign you in because your account isn't currently active. Please register or contact your site administrator."

One concern, the servers are in a subdomain of the domain where the users accounts reside.

We did verify the users appear in the dbo.Users table in SQL with the proper email address.

What info can we provide to troubleshoot this issue?

@MarkSPowell
Copy link

I believe this is caused when a users samAccountName and first part of email address are not the same thing.
CreateNewUser looks at the email address, strips off everything after the @ sign, and sets LoginID to that.

The LogonController, however, looks at User.Identity.Name, which is your Domain\samAccountName. It then strips off the Domain\ part, and looks for that LoginID.

I've submitted a pull request that changes both controllers to use User.Identity.Name instead. This should also allow users with the same name but from domains to log in- which, admittedly, I suspect is unlikely.

@PotentEngineer
Copy link
Author

Thank you Mark! That does match our environment, the names do not match up.

@MarkSPowell
Copy link

Waiting on approval to release my PR from our internal teams- and then MS will need to accept it.

Thinking I'll tweak it just a bit- if we just alter the Create User function to use the 2nd half of Http.Identity.User (IE, just the samAccountName), it'll maintain backwards compatibility with older versions.

That means that if you want to make stuff work today, open up your database and check the user table- change LogonID from your email address to your login id.

IE, if my email is mark.powell@example.com, but I type mspowell into windows to log in- change it from Mark.Powell to mspowell.

@PotentEngineer
Copy link
Author

update users
set LoginID = 'jdoe123'
where LoginId = 'johndoe'

That worked! We are in! Thanks for the help. Look forward for the updates.

@MarkSPowell
Copy link

Great. Does the Settings page work for you? I'm still playing with it, not sure if I made a mistake or it's a similar issue yet.

@PotentEngineer
Copy link
Author

No issues here. Settings are loading fine. We haven't configured them yet though.

@MarkSPowell
Copy link

Submitted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants