Add Active Directory users to role

Nicky Nguyen asked on December 31, 2014 07:17

Hi all,

My project requires using user in a Active Directory repository for authentication and authorization, it means that I need to manage users on Kentico roles but for now I just find a way to authenticate using AD. I want to add AD users to Kentico roles through admin but have not found out. Can somebody provide me solution for this requirement?

Thanks, Phuong

Recent Answers


Juraj Ondrus answered on December 31, 2014 10:26

Hi Nicky,

You can assign the already imported AD users to Kentico in the admin interface as any other users. Or, if you want to do it prior the importing the users from AD, you can use the AD import tool. In step 9 you can select the role that the users should be assigned to.

Best regards,
Juraj Ondrus

0 votesVote for this answer Mark as a Correct answer

Nicky Nguyen answered on December 31, 2014 13:02 (last edited on December 31, 2014 13:02)

Hi Juraj,

the requirement is to connect to AD repository then immediately import AD users to roles through admin UI. I cannot manually run the tool to import it because the AD repository is updated everyday.

Can you suggest a solution for this requirement.

Thanks, phuong

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 31, 2014 13:48

Nicky,

If you don't want to manually run the import then simply setup AD authentication and the first time (and each subsequent time after) a user logs in the roles they belong to in AD will be created if they are not already and the user will be assigned to the user.

If you want to create a process within the UI to perform this as needed by an administrator, you'll have to create a webpart for it and code that functionality to connect to AD and import the users and roles.

0 votesVote for this answer Mark as a Correct answer

Nicky Nguyen answered on December 31, 2014 13:56

Hi Brenden,

I thought about the solution #2 you mentioned. Do you know if we can add one more UI to admin module? I just want administrator is able to add user to role through admin UI.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 31, 2014 15:30

If that's the way you want/need to go then I'd do this:

  • Create a new Kentico security role.
  • Give that new role UI access to the Users app as well as the Roles app (might not be needed)
  • Give that new role permissions to access the Users app and possibly Roles.

This should then allow the users in that new role to access the Users app from the dashboard (in v8 that is). In v7, you'll have to customize some code and add some other things to get this to work properly.

0 votesVote for this answer Mark as a Correct answer

Nicky Nguyen answered on January 5, 2015 04:22

Hi Brenden,

I'm new with Kentico so can you provide a tutorial about implementation of Users app then add to admin interface?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on January 5, 2015 08:34

Hi,

To add to Brenden's suggestions.

You can use the tool and run it from a command line which means you can create a Windows scheduled job and run the tool with pre-defined profile every day to import the users and roles.

Best regards,
Juraj Ondrus

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.