Authorizable coming null in Aem Cloud | Community
Skip to main content
varuns48454013
Level 2
December 23, 2023

Authorizable coming null in Aem Cloud

  • December 23, 2023
  • 3 replies
  • 1476 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

yashp0808
Level 3
December 26, 2023
varuns48454013
Level 2
December 26, 2023

@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

aanchal-sikka
Community Advisor
Community Advisor
December 26, 2023

@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
varuns48454013
Level 2
December 26, 2023

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

UserManager apis not working in Aem Cloud.

aanchal-sikka
Community Advisor
Community Advisor
January 3, 2024

@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
kautuk_sahni
Community Manager
Community Manager
January 2, 2024

@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
varuns48454013
Level 2
January 3, 2024

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