# Can an Okta profile be accessed from the sign in page javascript?

**URL:** <https://devforum.okta.com/t/can-an-okta-profile-be-accessed-from-the-sign-in-page-javascript/29780>\
**Category:** OAuth/OIDC\
**Tags:** javascript\
**Created:** [July 31, 2024, 9:11pm UTC](https://devforum.okta.com/t/can-an-okta-profile-be-accessed-from-the-sign-in-page-javascript/29780 "2024-07-31T21:11:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmattox](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@kmattox](https://devforum.okta.com/u/kmattox)\
**Post date:** [July 31, 2024, 9:11pm UTC](https://devforum.okta.com/t/can-an-okta-profile-be-accessed-from-the-sign-in-page-javascript/29780/1 "2024-07-31T21:11:00Z")

</div>

Can an Okta profile and it’s properties be accessed from the sign in page javascript? We have the user’s profile name already.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [August 6, 2024, 3:56pm UTC](https://devforum.okta.com/t/can-an-okta-profile-be-accessed-from-the-sign-in-page-javascript/29780/2 "2024-08-06T15:56:01Z")

</div>

I can’t think of a secure way to do this. If the user has not completed login yet, they have no token/session/permission that can be use to request this kind of information and using an Admin token within Javascript is definitely not a secure idea.

What is your use case here?

---

<div class="post-metadata">

**Author:** ![kmattox](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@kmattox](https://devforum.okta.com/u/kmattox)\
**Post date:** [August 6, 2024, 6:33pm UTC](https://devforum.okta.com/t/can-an-okta-profile-be-accessed-from-the-sign-in-page-javascript/29780/3 "2024-08-06T18:33:34Z")

</div>

We would like to be able to get the user’s office which is stored as a custom property on the profile, possibly the userid as well

---

<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:** [September 5, 2024, 6:33pm UTC](https://devforum.okta.com/t/can-an-okta-profile-be-accessed-from-the-sign-in-page-javascript/29780/4 "2024-09-05T18:33:49Z")

</div>

Closed on September 5, 2024, 6:33pm UTC

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