
jpljw (jpljw) asked a question.
Hi,
We have an application using ASP.NET 4.8 with MVC 5. Was using ASP.NET Identity for login. Now we want to migrate to Okta. So how do I replace the class and methold level attribute [Authorize(Roles="admin")]? I have two situations, both need answer.
- Assume I have a corresponding "admin" claim after logged in with Okta. What to do?
- Assume I still use local [AspNetUserRoles] and [AspNetRoles] to check user role. What to do? Someone may ask why we do this, but we have very complex user athorization logic and don't want to put those in Okta.
Thanks you.

Hello @jpljw (jpljw) Thank you for reacting out to our Community!
Please see our claims documentation that should provide assistance with this issue:
https://developer.okta.com/docs/guides/customize-tokens-returned-from-okta/main/
https://developer.okta.com/blog/2017/07/25/oidc-primer-part-1
Additionally if you need further assistance we recommend to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
Community members help others by clicking Like or Select as Best on responses. Try it today.
this doesn't anwser my quesiton