# Cannot see custom attributes

**URL:** <https://devforum.okta.com/t/cannot-see-custom-attributes/16083>\
**Category:** OAuth/OIDC\
**Created:** [September 12, 2021, 8:46am UTC](https://devforum.okta.com/t/cannot-see-custom-attributes/16083 "2021-09-12T08:46:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AFC](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@AFC](https://devforum.okta.com/u/AFC)\
**Post date:** [September 12, 2021, 8:46am UTC](https://devforum.okta.com/t/cannot-see-custom-attributes/16083/1 "2021-09-12T08:46:51Z")

</div>

I created a few user attributes but after user logs on I cannot see the attribute.  
I am using pac4j. I setup the following

final OidcConfiguration oidcConfiguration = new OidcConfiguration();  
oidcConfiguration.setClientId(getOktaClientId());  
oidcConfiguration.setSecret(getOktaClientSecret());  
oidcConfiguration.setScope(“openid email profile phone address”);

oidcConfiguration.setDiscoveryURI(getOktaURL()+"/oauth2/default/.well-known/openid-configuration");  
oidcConfiguration.setUseNonce(true);  
final OidcClient\<OidcProfile, OidcConfiguration\> oidcClient = new OidcClient\<\>(oidcConfiguration);  
oidcClient.setAuthorizationGenerator((ctx, profile) → {  
profile.addRole(“ROLE\_USER”);  
return profile;  
});

I also created a claim for the custom attribute.

For the user that logs in I have the following code:  
J2EContext context1 = new J2EContext(request, response);  
ProfileManager manager = new ProfileManager(context1);  
final Optional optional = manager.get(true);

Printing manager.getAll(true)  
doesnot show custom attributes.

---

<div class="post-metadata">

**Author:** ![dawoudt](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dawoudt](https://devforum.okta.com/u/dawoudt)\
**Post date:** [December 8, 2022, 6:35am UTC](https://devforum.okta.com/t/cannot-see-custom-attributes/16083/2 "2022-12-08T06:35:47Z")

</div>

Hi @AFC If your claims are in your id\_token and you have them set to return in userinfo instead of always you may need to hit the userinfo endpoint to get those attributes.

See here [OpenID Connect & OAuth 2.0 API | Okta Developer](https://developer.okta.com/docs/reference/api/oidc/#userinfo)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 13, 2024, 12:13am UTC](https://devforum.okta.com/t/cannot-see-custom-attributes/16083/3 "2024-02-13T00:13:18Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
