com.adobe.granite.security.user.UserProperties Java Class: what's the difference between authorizableId vs principalName? | Community
Skip to main content
jayv25585659
April 6, 2022
Solved

com.adobe.granite.security.user.UserProperties Java Class: what's the difference between authorizableId vs principalName?

  • April 6, 2022
  • 2 replies
  • 1202 views

I created a new user (ID=a0001) in my local AEM and both functions give me the same value (which is a0001).

 

The Adobe reference document is not very clear on the distinction. Thanks

 

EDIT: I had a look in CRX/DE for the properties of a0002 user and rep:principleName and rep:authorizableId has the same value.

 

 

String principalName = userProperties.getPrincipalName(); String authorizableID = userProperties.getAuthorizableID();

 

 

 

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

I have got this information -

https://blogs.taylor-made-software.co.uk/aem/101/build/apps/users.html

 

Hope this will help.

2 replies

DEBAL_DAS
DEBAL_DASAccepted solution
April 6, 2022

I have got this information -

https://blogs.taylor-made-software.co.uk/aem/101/build/apps/users.html

 

Hope this will help.

Rohan_Garg
Community Advisor
Community Advisor
July 17, 2023

Also refer to the below link to understand more on the difference between Authorizable and Principal - 

 

Please note the difference between Authorizable and Principal:
An Authorizable is repository object that is neither associated with nor depending from a particular Session and thus independent of the login mechanisms creating Sessions.

On the other hand Principals are representations of user identities. In other words: each Principal within the set associated with the Session's Subject upon login represents an identity for that user. An the set of Principals may differ between different login mechanisms.

Consequently an one-to-many relationship exists between Authorizable and Principal (see also getPrincipal().

 

Source - https://developer.adobe.com/experience-manager/reference-materials/6-4/javadoc/org/apache/jackrabbit/api/security/user/Authorizable.html