Dror Rash
12/11/2025, 10:46 AMDror Rash
12/11/2025, 10:54 AMRahul Rijhwani
12/11/2025, 11:55 AMread-only) when group data is missing".
• Validate Roles in Your Application: Check the roles claim in the user's JWT at critical points in your application. The roles are "included in the user's JWT (roles claim, under the associated tenant)".
• Use Custom Audit Events: While standard audit events may not capture all role changes, you can create custom audit events using the Generate Audit Event action in Descope Flows. This action "creates custom audit events that are logged and available in your project's Audit page".
◦ You can configure it to track:
▪︎ Action name (e.g., "Role Assignment Check")
▪︎ Event type (Information, Warning, or Error)
▪︎ Event data including user information and role details
• Consider SCIM Over JIT: For more reliable provisioning, SCIM is recommended when your IdP supports it. SCIM provides "continuous updates, group management, and de-provisioning", whereas JIT "does not update user attributes if they change in the IdP"
• Verify Group Attribute Configuration: Ensure the Groups Attribute Name is correctly configured in your SSO mapping. In Okta specifically, verify that group attributes are properly set up in the SAML or OIDC configuration.
Docs : https://docs.descope.com/management/tenant-management/scim
https://docs.descope.com/auth-methods/sso/saml#configuring-sso-with-saml
https://docs.descope.com/flows/actions/generate-audit-event
https://docs.descope.com/sso/setup-guides/okta#configuring-scim
Audit Events
Custom audit events generated through the Generate Audit Event action will appear in your project's Audit page with timestamp, action name, event type, event data, and user information. This can help you track when users authenticate without expected roles Doc.Rahul Rijhwani
12/11/2025, 11:57 AMDror Rash
12/11/2025, 12:34 PMGenerate Audit Event how do i know when in the flow i should add the action?Doron Sharon
12/11/2025, 12:59 PMDoron Sharon
12/11/2025, 1:00 PMDror Rash
12/11/2025, 1:24 PMDoron Sharon
12/11/2025, 1:37 PMDoron Sharon
12/11/2025, 1:37 PMDoron Sharon
12/11/2025, 1:37 PMDoron Sharon
12/11/2025, 1:38 PMDror Rash
12/11/2025, 1:44 PMDoron Sharon
12/11/2025, 2:12 PMDror Rash
12/11/2025, 4:00 PMLoginStarted event. so i can't see the response from the IDPDoron Sharon
12/11/2025, 4:01 PMDror Rash
12/11/2025, 4:02 PMDoron Sharon
12/11/2025, 4:23 PM[E064011] JWT inactive for too long: JWT was inactive for too long
JWT Issued at: 2025-12-09T14:55:23Z
Inactivity time from settings: 15000 (~4 hours)Doron Sharon
12/11/2025, 4:24 PMDoron Sharon
12/11/2025, 4:25 PMDror Rash
12/11/2025, 4:26 PMDror Rash
12/11/2025, 4:27 PMDror Rash
12/11/2025, 4:27 PMDoron Sharon
12/11/2025, 4:29 PMDoron Sharon
12/11/2025, 4:29 PMDror Rash
12/11/2025, 4:29 PMDoron Sharon
12/11/2025, 4:30 PMDror Rash
12/11/2025, 4:31 PMDecember 08, 2025 11:14
1765185264651Doron Sharon
12/11/2025, 4:39 PMDror Rash
12/11/2025, 4:41 PM36YZ6MZZLppSgAkFpQUwbOEOOTPDoron Sharon
12/11/2025, 4:49 PMDoron Sharon
12/11/2025, 4:50 PMDoron Sharon
12/11/2025, 4:50 PMDoron Sharon
12/11/2025, 4:50 PMDror Rash
12/11/2025, 4:51 PMDoron Sharon
12/11/2025, 4:52 PMDoron Sharon
12/11/2025, 4:52 PMDoron Sharon
12/11/2025, 4:52 PMDoron Sharon
12/11/2025, 4:53 PMDror Rash
12/11/2025, 4:53 PMDoron Sharon
12/11/2025, 4:54 PMDoron Sharon
12/11/2025, 4:54 PMDoron Sharon
12/11/2025, 4:54 PMDoron Sharon
12/11/2025, 4:55 PMDror Rash
12/11/2025, 4:55 PMDror Rash
12/11/2025, 4:55 PMDoron Sharon
12/11/2025, 4:55 PMDoron Sharon
12/11/2025, 4:56 PMFirst User Login MethodDoron Sharon
12/11/2025, 4:58 PMDoron Sharon
12/11/2025, 4:58 PMDoron Sharon
12/11/2025, 5:03 PM0 groups, but there are 2 default roles that got assigned to that user.
But for some reason, I see that the flow execution never ended.Dror Rash
12/11/2025, 5:04 PMDoron Sharon
12/11/2025, 5:04 PMDoron Sharon
12/11/2025, 5:04 PMDror Rash
12/11/2025, 5:08 PM"correlation_id": "36Q4icnLpuNDMGokBemyLsbyKhZ",
"flow_execution_id": "36Q4ih8xFr2dJUcn9MKkR8Owp4z",
December 05, 2025 11:06 / 1764925589211Doron Sharon
12/11/2025, 5:10 PMDoron Sharon
12/11/2025, 5:10 PMDoron Sharon
12/11/2025, 5:10 PMDoron Sharon
12/11/2025, 5:10 PMDoron Sharon
12/11/2025, 5:11 PMDoron Sharon
12/11/2025, 5:11 PMDoron Sharon
12/11/2025, 5:18 PM36YZ6MZZLppSgAkFpQUwbOEOOTP
36Q4ih8xFr2dJUcn9MKkR8Owp4zDoron Sharon
12/11/2025, 5:21 PMDror Rash
12/11/2025, 5:22 PMDror Rash
12/11/2025, 5:23 PMDror Rash
12/11/2025, 5:23 PMDoron Sharon
12/11/2025, 5:29 PMValidate sufficient roles which I guess that’s the problem.Doron Sharon
12/11/2025, 5:29 PMDror Rash
12/11/2025, 5:32 PMValidate sufficient roles if there are insufficient roles should break with no error, so there could might be an issue with the condition validationDoron Sharon
12/11/2025, 5:32 PMDoron Sharon
12/11/2025, 5:33 PMDror Rash
12/11/2025, 5:33 PMDoron Sharon
12/11/2025, 5:33 PMDror Rash
12/11/2025, 5:34 PMDoron Sharon
12/11/2025, 5:35 PMDoron Sharon
12/11/2025, 5:35 PMDror Rash
12/11/2025, 5:35 PMDoron Sharon
12/11/2025, 5:36 PMDoron Sharon
12/11/2025, 5:36 PMDror Rash
12/11/2025, 5:36 PMDror Rash
12/11/2025, 5:36 PMDoron Sharon
12/11/2025, 5:37 PMDoron Sharon
12/11/2025, 5:38 PMDoron Sharon
12/11/2025, 5:38 PMDror Rash
12/11/2025, 5:39 PMDror Rash
12/11/2025, 5:39 PMDoron Sharon
12/11/2025, 5:40 PMDoron Sharon
12/11/2025, 5:40 PMDoron Sharon
12/11/2025, 5:40 PMDoron Sharon
12/11/2025, 5:41 PMDror Rash
12/11/2025, 5:41 PMDoron Sharon
12/11/2025, 5:41 PMDror Rash
12/11/2025, 5:42 PMDoron Sharon
12/11/2025, 5:42 PMTenantSettingsDoron Sharon
12/11/2025, 5:43 PMDoron Sharon
12/11/2025, 5:44 PMSAMLSettingsDror Rash
12/11/2025, 5:49 PMDoron Sharon
12/11/2025, 5:54 PMDror Rash
12/11/2025, 5:56 PMDror Rash
12/11/2025, 5:58 PMDror Rash
12/11/2025, 6:39 PMDecember 11, 2025 19:46 / 1765475213928
last attempt is December 11, 2025 19:53 / 1765475624485Doron Sharon
12/11/2025, 6:41 PMDror Rash
12/11/2025, 6:52 PM36i2o2S6ihCMOtDNgqYB9G5rujvDoron Sharon
12/11/2025, 6:56 PMDoron Sharon
12/11/2025, 6:56 PMDoron Sharon
12/11/2025, 6:57 PMDoron Sharon
12/11/2025, 6:57 PMIgnoring custom claim field which is too bigDoron Sharon
12/11/2025, 6:57 PM1503Dror Rash
12/11/2025, 6:59 PMDoron Sharon
12/11/2025, 7:00 PMpython sdk, I guess it is something you are calling from your backend.Dror Rash
12/11/2025, 7:02 PMpythonDoron Sharon
12/11/2025, 7:02 PMDoron Sharon
12/11/2025, 7:04 PM/v1/mgmt/jwt/update
To this project: P32lusHUPY06hG8MJtqJnKEmq7hJ
By this IP: 54.88.41.70
With this Mgmt Key ID: K3340rb0ibyNDdMIcu8aeA9Yby1PDoron Sharon
12/11/2025, 7:04 PMpython|1.7.12Doron Sharon
12/11/2025, 7:04 PMDror Rash
12/11/2025, 7:05 PMDoron Sharon
12/11/2025, 7:06 PMDoron Sharon
12/11/2025, 7:06 PM54.88.41.70Dror Rash
12/11/2025, 7:07 PMDoron Sharon
12/11/2025, 7:07 PMDoron Sharon
12/11/2025, 7:08 PM1503 lengthDoron Sharon
12/11/2025, 7:08 PMDror Rash
12/11/2025, 7:08 PMDoron Sharon
12/11/2025, 7:08 PM54.88.41.70Dror Rash
12/11/2025, 7:10 PMDoron Sharon
12/11/2025, 7:11 PMDoron Sharon
12/11/2025, 7:11 PMDror Rash
12/11/2025, 7:12 PMDoron Sharon
12/11/2025, 7:25 PMDoron Sharon
12/11/2025, 7:25 PMDoron Sharon
12/11/2025, 7:26 PMhttps://app.valkyrie.io/Doron Sharon
12/11/2025, 7:27 PMhttps://app.valkyrie.io/login
Otherwise, your app just recognize there is existing cookie and “let the user in”, and not proceed with the flow.Dror Rash
12/11/2025, 7:29 PMhttps://app.valkyrie.io should be to /login ?Doron Sharon
12/11/2025, 7:30 PMDoron Sharon
12/11/2025, 7:30 PMDoron Sharon
12/11/2025, 7:31 PMDoron Sharon
12/11/2025, 7:31 PMDoron Sharon
12/11/2025, 7:32 PMDror Rash
12/11/2025, 7:34 PMDoron Sharon
12/11/2025, 7:39 PM/login, repeat the steps and see that you are logged in with the SSO userDoron Sharon
12/11/2025, 7:40 PMDror Rash
12/11/2025, 8:14 PMDror Rash
12/11/2025, 8:14 PMDoron Sharon
12/11/2025, 8:25 PMDror Rash
12/11/2025, 8:26 PMDror Rash
12/11/2025, 8:26 PMvalkyrie-test
the project is P2eBJujlJH6Z5frTKzvQeXgW4PZfDoron Sharon
12/11/2025, 8:27 PMDoron Sharon
12/11/2025, 8:27 PMDoron Sharon
12/11/2025, 8:28 PMDror Rash
12/11/2025, 8:28 PMDoron Sharon
12/11/2025, 8:29 PMDror Rash
12/11/2025, 8:30 PMdror@valkyrie.io-valkyrie-test
U36I3P4foZhcB4Czp5jb6TVKr4TfDror Rash
12/11/2025, 8:31 PMDoron Sharon
12/11/2025, 8:32 PMDoron Sharon
12/11/2025, 8:33 PMDoron Sharon
12/11/2025, 8:33 PMDoron Sharon
12/11/2025, 8:33 PMDoron Sharon
12/11/2025, 8:34 PMDoron Sharon
12/11/2025, 8:34 PMDoron Sharon
12/11/2025, 8:35 PMDoron Sharon
12/11/2025, 8:37 PMDror Rash
12/11/2025, 8:44 PMDoron Sharon
12/11/2025, 8:50 PMDoron Sharon
12/11/2025, 8:50 PM/loginDror Rash
12/11/2025, 9:03 PMDror Rash
12/12/2025, 5:10 AMhttps://app.valkyrie.io
In both cases, when users return from the IdP to complete the login flow, it appears that stale/expired session cookies sometimes prevent the final step of the login, and users end up in an incomplete session with no roles applied.
Verification Questions
1. Why isn’t this behavior consistent across all users in each tenant?
The inconsistent behavior could be due to timing and how Descope handles session cookies and role resolution:
• Role assignments (from group mappings, SCIM push, or default roles) are evaluated during the SSO login exchange, not after a stale/descope session cookie is reused.
• If a session cookie is present and used instead of a fresh SSO code exchange, the backend may skip a full role resolution run, leading to missing roles.
• Variability in IdP assertions (groups/attributes) or differences in who has active session cookies may make this issue sporadic rather than consistent.
This behavior matches known patterns with cookie-managed sessions and IdP-initiated flows where a fresh exchange isn’t forced every time.
2. If default roles exist, will users receive both the default roles and the expected additional roles?
Yes — default roles are fallback roles assigned when no mapped roles are present from group/attribute mappings. But:
• If group/role mapping does produce roles from the IdP or SCIM groups on login, those mapped roles are applied.
• Default roles apply only when no mapped role sources are present.
• If you expect users to have default + other roles, you need to ensure that:
◦ Attribute/group mappings from the IdP include the additional expected roles, not only relying on default roles.
◦ SCIM provisioning populates groups/attributes before SSO.
• Otherwise, default roles can be the only roles a user receives when no mapped roles arrive from SSO group data.
3. Will default roles be applied when JIT provisioning is not defined?
In Descope:
• Default roles are applied to users created via JIT when there are no mapped roles from the Identity Provider.
• However:
◦ If JIT is disabled and only SCIM is used, the system should rely on SCIM-pushed group/role mappings.
◦ Default roles may still apply as a fallback if SCIM does not push any group/role attributes for a user — but this depends on the specific SCIM configuration and timing.
• If JIT is disabled in favor of SCIM, it’s typically recommended that SCIM fully populate group memberships so that fallback scenarios are minimized.
Additional Notes
• The behavior where stale cookies interfere with completing the login flow is consistent with situations where Descope does not perform a fresh code exchange because the session is considered “already authenticated.” This means role resolution may not re-run.
• Ensuring a reliable SSO flow often requires:
◦ Forcing a full IDP → Descope SSO handshake on first login (no reuse of stale cookies), or
◦ Clearing/refreshing sessions before SSO redirects are processed.Doron Sharon
12/12/2025, 8:10 AMDoron Sharon
12/12/2025, 8:13 AMDror Rash
12/14/2025, 8:30 AMhttps://app.valkyrie.io is it possible to set to the project by default the URL https://app.valkyrie.io/loginDoron Sharon
12/14/2025, 12:07 PMhttps://app.valkyrie.io as the default for the project, just change it to https://app.valkyrie.io/login
It is defined in the SSO project level: https://app.descope.com/settings/authentication/ssoDror Rash
12/14/2025, 12:57 PM