<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z000073FG3kCAGOkta Classic EngineSingle Sign-OnAnswered2021-07-13T07:31:09.000Z2021-07-09T11:18:58.000Z2021-07-13T07:31:09.000Z

NambiR.07528 (Customer) asked a question.

How to assign user to OpenId Connect app (Angular SPA) automatically

Hi, My setup is like this,

 

  1. I have done app integration (Angular OIDC Sample) in Okta .
  2. I have two users User1 and User2
  3. User1 is added in Okta organization and User2 is not added in Okta organization
  4. Assigned User1 to my app Angular OIDC Sample.
  5. When User1 tries to login and able to login and get the access and id tokens, But When User2 tries to login it says error: "OAuthError: User is not assigned to the client application." (Because this user is not in my organization and not assigned to the app Angular OIDC sample)

 

My Questions :

 

  1. How to automatically assign the user to app when he tries to login into my app ?
  2.  Is there a way to assign the new user User2 to the Angular OIDC Sample app automatically when the user logs in for the first time?

 


  • sandeepk.84743 (Wipro Technologies)

    Well my friend, you are trying to steal the job of an OKTA Administrator. 🙂

    Jokes apart, you can do this with the help of Okta API's to automate the user assignment & Provisioning. There is nothing out of the box available. But yes with the help of OKTA API's this can be done. Just need to invoke the Okta Application assignment API, before the user login happen.

     

    I hope it helps.

     

    Expand Post
This question is closed.
Loading
How to assign user to OpenId Connect app (Angular SPA) automatically