# Java API Access Authenticated Principle Meta Data

**URL:** <https://community.auth0.com/t/java-api-access-authenticated-principle-meta-data/6954>\
**Category:** Get Help\
**Tags:** spring, api, java, spring-boot\
**Created:** [June 7, 2017, 10:44pm UTC](https://community.auth0.com/t/java-api-access-authenticated-principle-meta-data/6954 "2017-06-07T22:44:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jphunsley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jphunsley/32/15326_2.png) [@jphunsley](https://community.auth0.com/u/jphunsley)\
**Post date:** [June 7, 2017, 10:44pm UTC](https://community.auth0.com/t/java-api-access-authenticated-principle-meta-data/6954/1 "2017-06-07T22:44:36Z")

</div>

I’m using the Java Spring Boot/Security API ([GitHub - auth0/auth0-spring-security-api: Spring Security integration with Auth0 to secure your API with JWTs · GitHub](https://github.com/auth0/auth0-spring-security-api)) within my REST API. This will be the back end service for my Vue.js front end which and will use Json Web Tokens as the authentication and authorization mechanism. I have followed the quick start guide and seems pretty straight forward.

The issue I have is that my application is multi tenant. I will hold the tenant identifier in the user’s app meata data and I need to access that in the back end service. My question is; how do I access the authenitcated principle via the auth0-spring-security-api package?

I can see the Principle object can be accessed in AuthenticationJsonWebToken#getPrinciple function. Can anyone show me how I get a handle on the AuthenticationJsonWebToken in my Controller? I assume I need to type cast something from the Spring Security package such as the Authenitcaiton instance?

Mnay thanks

John

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/java-api-access-authenticated-principle-meta-data/6954/2 "2018-03-02T05:54:27Z")

</div>


