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.

Authorizable coming null in Aem Cloud

Avatar

Level 2

Hi All

I am working on a use case to create private folder programmatically but in my local sdk when I am trying to get Authorizable object it is always coming null

Below is the code snippet

 

UserManager userManager = resolver.adaptTo(UserManager.class)

userManager.getAuthorizarble( “admin”):

 

resolver is comong from service user. Service user had admin permission

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

8 Replies

Avatar

Level 2

@yashp0808 This uses administrative session which is deprecated. 
On using service user in cloud sdk it doesnt work

However same code is working Aem 6.5 jar

Avatar

Community Advisor

@varuns48454013 

 

Please avoid using administrative resource resolve or admin sessions for any use-cases. We might be able to exploit them in AEM 6.5, but on AEMaaCS its a strict NO.

 

Please create Service Users, assign permissions, map them against service/bundle and use them.


Aanchal Sikka

Avatar

Level 2

@aanchal-sikka That is correct. I am aware of it but my query is a bit different.

UserManager apis not working in Aem Cloud.

Avatar

Community Advisor

@varuns48454013 

 

The API should work on Cloud as well.

Requesting you to please check, if the User that the Resolver belongs to have read access on:

  • /home/users 

 

Also, please try with a user other than 'admin'.


Aanchal Sikka

Avatar

Administrator

@varuns48454013  Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Level 2

@kautuk_sahni No the issue is still not resolved. I am looking for some other way to get it working