Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

LoginService method in AEM 6.2

Avatar

Level 4

Hi,

As .loginAdministrative(null) is deprecated in CQ 5.5 and in AEM  6.2 loginService(String,String) method is used.

As in 5.5 there is no need to create service user and .loginAdministrative(null) was used,

And in AEM 6.2 ,

For creating group and users , it is necessary that only service user can do following operation i.e creating group and users in crx repository?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Yes you can create users and groups pragramatically but you cannot create system user pragramatically.

See this thread: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...Create system user via AEM GUI - http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/

And yes you are right, for creating users and groups, service user is required since, loginAdministrative(null) is deprecated.

See this below thread for how to create users and groups programitically using service user::

//http://stackoverflow.com/questions/38661668/how-to-create-user-and-group-in-aem6-2-programattically-...

Hope this helps!!

~ Ratna.

View solution in original post

5 Replies

Avatar

Level 10

Hi Umesh,

You can create groups and users using useradmin console. System user not at all required to create groups and users in repository.

//Why system user was introduced in AEM 6.x versions:

Use of admin session and admin resource resolver through ResourceresolverFactory is now deprecated, that’s why from AEM 6.1 Adobe forces developers to create system users and map them to Service User Mapper in Felix Console. 

  • Prevent excessive use of administrative JCR Sessions and ResourceResolvers.
  • Allow services access to ResourceResolvers and JCR Sessions without requiring to hard-code or configure passwords.
  • Allow services to use service users and/or system user which are specially configured for service level access.

For more information on this system user topic see the below link:

//http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/

Hope this helps!!

~Ratna.

Avatar

Level 4

Thanks , I agree with your point.

But,

I have to create a users and groups programatically that is in osgi-bundle , I think for it service user are  required, doesn't it?

Also, Can i create system user programatically?

 

Thanks

Avatar

Correct answer by
Level 10

Hi,

Yes you can create users and groups pragramatically but you cannot create system user pragramatically.

See this thread: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...Create system user via AEM GUI - http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/

And yes you are right, for creating users and groups, service user is required since, loginAdministrative(null) is deprecated.

See this below thread for how to create users and groups programitically using service user::

//http://stackoverflow.com/questions/38661668/how-to-create-user-and-group-in-aem6-2-programattically-...

Hope this helps!!

~ Ratna.

Avatar

Level 4

Thanks..

In AEM 6.2, I am able to use loginAdministrative(null) method but not in AEM 6.3.

we can still use this method in 6.2 but not in 6.3? is this correct?

Avatar

Level 10

Hi,

Yes, you can still use loginAdministrative(null) method in AEM 6.2 even it is deprecated.

I am not sure about AEM6.3 because, it is yet to release in April, 2017.

~ Ratna.