# How to assign users to custom role using Okta Sign-In Widget

**URL:** <https://devforum.okta.com/t/how-to-assign-users-to-custom-role-using-okta-sign-in-widget/12281>\
**Category:** Questions\
**Created:** [December 28, 2020, 8:09pm UTC](https://devforum.okta.com/t/how-to-assign-users-to-custom-role-using-okta-sign-in-widget/12281 "2020-12-28T20:09:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikbargat](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/karthikbargat/32/2481_2.png) [@karthikbargat](https://devforum.okta.com/u/karthikbargat)\
**Post date:** [December 28, 2020, 8:09pm UTC](https://devforum.okta.com/t/how-to-assign-users-to-custom-role-using-okta-sign-in-widget/12281/1 "2020-12-28T20:09:09Z")

</div>

I am using the Okta Sign-In Widget in an Angular application. I would like to assign users to a custom role during user self-registration. I have an app for an alumni website. The users can self-register. I want a new drop-down list that has: Student, Alumni. Based on selection, I need to assign the student role or alumni role. How can I do code this?

I am using Angular 11, Okta Sign-In Widget and Okta Developer Account.

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [December 29, 2020, 5:06pm UTC](https://devforum.okta.com/t/how-to-assign-users-to-custom-role-using-okta-sign-in-widget/12281/2 "2020-12-29T17:06:42Z")

</div>

I’m assuming you’re using the Self-Service Registration flow [https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-self-service.htm](https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-self-service.htm)? If yes, you can add a custom attribute and define an enumerated list of values. Then you would add the attribute to the “Registration form fields” under the Self-Service Registration settings in your Okta org. The field should then appear as a dropdown when you click on “Sign Up” in the widget.

 ![Screen Shot 2020-12-29 at 9.01.34 AM](https://global.discourse-cdn.com/oktadev/original/2X/6/639aad081cf66dc30ca6e2984c40f7983e9cf216.png)

---

<div class="post-metadata">

**Author:** ![karthikbargat](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/karthikbargat/32/2481_2.png) [@karthikbargat](https://devforum.okta.com/u/karthikbargat)\
**Post date:** [January 12, 2021, 12:30am UTC](https://devforum.okta.com/t/how-to-assign-users-to-custom-role-using-okta-sign-in-widget/12281/3 "2021-01-12T00:30:49Z")

</div>

Thank you very much Warren.

---

<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:** [January 13, 2021, 12:30am UTC](https://devforum.okta.com/t/how-to-assign-users-to-custom-role-using-okta-sign-in-widget/12281/4 "2021-01-13T00:30:51Z")

</div>

Closed on January 13, 2021, 12:30am UTC

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