![BlogImage.jpg](https://lh3.googleusercontent.com/-wmwqcPiPcH8/YbeSnVUPYHI/AAAAAAAARlE/DLgQ2tTisB4avTqeGiCI1BEIGIGCSQQQQCNcBGAsYHQ/w640-h166/image.png)
Abstract
While using the loginAdministrative() method of SlingRepository class you might see an error "Bundle is not whitelisted". To get this method work we have to whitelist the bundle in OSGi configuration "Apache Sling Login Admin Whitelist" this helps us to defines which bundles can use SlingRepository.loginAdministrative().
Below is the code snippet of creating session using loginAdministartive method.
@Reference
private SlingRepository repository
Session session = repository.loginAdministrative(null);
Read Full Blog
Q&A
Please use this thread to ask the related questions.
Kautuk Sahni