# Groups not implementing correctly

**URL:** <https://devforum.okta.com/t/groups-not-implementing-correctly/1126>\
**Category:** OAuth/OIDC\
**Created:** [January 26, 2018, 1:05am UTC](https://devforum.okta.com/t/groups-not-implementing-correctly/1126 "2018-01-26T01:05:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![snigdhajha](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@snigdhajha](https://devforum.okta.com/u/snigdhajha)\
**Post date:** [January 26, 2018, 1:05am UTC](https://devforum.okta.com/t/groups-not-implementing-correctly/1126/1 "2018-01-26T01:05:58Z")

</div>

Hi,

I have created 2 different applications and assigned 2 different groups to each.  
I then created 2 login forms for each application, in the code of each giving respective redirect URI and clientId.

Unfortunately i am able to login to both the applications using the email IDs that do not belong to the group assigned to each of them.

So if snigdha is assigned to app1, sagar is assigned to app2.

I am still able to login to app1 using sagar’s email ID.

The code i am using in the frontend application is

 ![25%20PM](https://global.discourse-cdn.com/oktadev/original/1X/9ba3ea79d7e0718d8db8ab5ec570b3655cd60a9c.png)

---

<div class="post-metadata">

**Author:** ![bdemers](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/bdemers/32/23_2.png) [@bdemers](https://devforum.okta.com/u/bdemers)\
**Post date:** [January 26, 2018, 3:34pm UTC](https://devforum.okta.com/t/groups-not-implementing-correctly/1126/2 "2018-01-26T15:34:48Z")

</div>

When you log into the Okta Developer Console, and view your applications, do you see your user `sagar` listed in each one?

---

<div class="post-metadata">

**Author:** ![snigdhajha](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@snigdhajha](https://devforum.okta.com/u/snigdhajha)\
**Post date:** [January 26, 2018, 6:25pm UTC](https://devforum.okta.com/t/groups-not-implementing-correctly/1126/3 "2018-01-26T18:25:30Z")

</div>

Nope, user sagar is listed only in app2.

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [January 26, 2018, 9:59pm UTC](https://devforum.okta.com/t/groups-not-implementing-correctly/1126/4 "2018-01-26T21:59:14Z")

</div>

Can you tell me what is going on in your success handler?

My guess is you are going into the `else` statement because you don’t get tokens for that application. Okta is still creating a session because you successfully logged into the org, but you won’t get application tokens.

Can you confirm?

---

<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:** [January 12, 2024, 8:16pm UTC](https://devforum.okta.com/t/groups-not-implementing-correctly/1126/5 "2024-01-12T20:16:27Z")

</div>

Closed on January 12, 2024, 8:16pm UTC


