This topic is locked

Is it possible to login with either a database or AD username via the same user login table record

5/17/2024 8:01:35 AM
ASPRunner.NET General questions
P
plunkchr author

Wondering if it is possible to use a single user record to provide login for both local database and Active Directory.

Reason is: I have been using local database with static user permissions and have a large number of user records in the user table (database) with database defined usernames.
e.g.
ID Username Ext Security Id Email Fullname Groupid
2 jsmith a_ JohnSmith John.Smith@hse.ie John Smith MasterAdminGroup

The user records are used to provide access/filtering/etc.. for other tables via the user record ID [ID] not the [Username]
I am enabling Active Directory and dynamic permissions (which seems to be a pre requisite for AD to work)

I have added AD usernames to existing user records which works for AD login;
However;
-The Dynamic permissions option to add users to groups, only shows the AD username and AD as source name. The database username is not shown even though it is the same user record, see above.
-I can set group permissions for the AD user name which works for login via the AD username JohnSmith (Ext Security Id).
-I can still login via the database username jsmith (Username), but it looks like no permissions are configured and I just get the default permissions, which I have configured to show nothing.
i.e. Does not seem to be a way to manage permissions for Username if Ext Security Id is used !!

***Question:
if it is possible to use a single user record to provide login for both local database and Active Directory with the same permissions assigned via permissions admin tool.



Sergey Kornilov admin 5/20/2024

I don't really know if this possible or not as your scenario is not easy to follow.

Just an idea of how it might work. First, make a user to logon via AD, which will create a record in the database. Then you can add a password field to this table, select username/password fields and you can enable database login as well.