# First SAML JIT login blocked — groups assigned after unauth\_app\_access\_attempt; second login works

**URL:** <https://devforum.okta.com/t/first-saml-jit-login-blocked-groups-assigned-after-unauth-app-access-attempt-second-login-works/35325>\
**Category:** Questions\
**Created:** [June 19, 2026, 4:04am UTC](https://devforum.okta.com/t/first-saml-jit-login-blocked-groups-assigned-after-unauth-app-access-attempt-second-login-works/35325 "2026-06-19T04:04:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe75](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@joe75](https://devforum.okta.com/u/joe75)\
**Post date:** [June 19, 2026, 4:04am UTC](https://devforum.okta.com/t/first-saml-jit-login-blocked-groups-assigned-after-unauth-app-access-attempt-second-login-works/35325/1 "2026-06-19T04:04:12Z")

</div>

Hi,

We’re integrating **Entra ID → Okta (SAML IdP) → OIDC web app** for a multi-tenant SaaS app.

**Setup:**

- Inbound SAML IdP with **JIT** (create user on first login)
- IdP **Group Assignments = Add user to missing groups** (Entra sends group Object IDs in SAML)
- **Group Rules** map customer AD groups → Okta **tenant** and **role** groups
- OIDC app is assigned to **tenant** groups (one tenant group per customer)
- App needs **tenant / role / site** in the **ID token**

**Problem:**  
On **first login** for a new JIT user, Okta creates the user and syncs the Entra AD group, but we get **`app.generic.unauth_app_access_attempt` FAILURE** before any OAuth token is issued. **Tenant/role groups and app membership are added milliseconds later** (Group Rules). User has to **log in a second time** — then authorize + token grant succeed and the ID token is fine.

We **can’t use Full sync of groups** because it removes users from our Okta-managed tenant/role groups that aren’t in the SAML assertion.

**Log sequence (first session, same `root_session_id`):**

user.lifecycle.create SUCCESS (JIT)

group.user\_membership.add SUCCESS (customer AD group from Group Sync)

user.authentication.auth\_via\_IDP SUCCESS (JIT provisioned new user)

app.generic.unauth\_app\_access\_attempt FAILURE ← blocked here

group.user\_membership.add SUCCESS (tenant group — Group Rule)

group.user\_membership.add SUCCESS (role group — Group Rule)

application.user\_membership.add SUCCESS (OIDC app)

No `app.oauth2.as.authorize.code` or token grant in that session. Second login ~9s later — all SUCCESS.

**Question:**  
What’s the **recommended way** to fix this ordering so **first login** works?

- Assign **tenant group** at IdP JIT ( **Assign to specific groups** ) while still syncing Entra AD groups?
- Run **Group Rules synchronously** before app authorization?
- Use **Auth Server expression claims** from a JIT profile attribute (e.g. `customerGroupIds`) instead of Okta group membership?
- **OIDC Token Inline Hook**?
- Can this be address through workflow ?

We know there’s **no JIT inline hook** on inbound SAML provisioning ([this thread](https://devforum.okta.com/t/inline-hooks-and-jit-provisioning/22395)) — looking for the supported pattern for this timing gap.

Thanks!

---

<div class="post-metadata">

**Author:** ![vk-giri](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/vk-giri/32/5178_2.png) [@vk-giri](https://devforum.okta.com/u/vk-giri)\
**Post date:** [June 19, 2026, 7:41am UTC](https://devforum.okta.com/t/first-saml-jit-login-blocked-groups-assigned-after-unauth-app-access-attempt-second-login-works/35325/2 "2026-06-19T07:41:23Z")

</div>

HI,

Have you tried out Federation Broker mode - [Federating the identity & access management with 3rd party IdP (race condition issue)](https://devforum.okta.com/t/federating-the-identity-access-management-with-3rd-party-idp-race-condition-issue/33996)

---

<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:** [July 19, 2026, 7:41am UTC](https://devforum.okta.com/t/first-saml-jit-login-blocked-groups-assigned-after-unauth-app-access-attempt-second-login-works/35325/3 "2026-07-19T07:41:55Z")

</div>

Closed on July 19, 2026, 7:41am UTC

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