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

Authorizable coming null in Aem Cloud

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.

8 replies

kautuk_sahni
Employee
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.

Translate
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

Translate
aanchal-sikka
New Participant
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.

Translate
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.

Translate
aanchal-sikka
New Participant
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'.

Translate
Aanchal Sikka
yashp0808
Level 3
December 26, 2023

@varuns48454013  you can refer this article for a similar implementation - 

 

Solved: Get Current User by Using Jackrabbit - Adobe Experience League Community - 196414

Translate
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

Translate