Skip to content

feat: Add My Org client references and expand organization connection sync#1367

Merged
kushalshit27 merged 15 commits intomasterfrom
DXCDT-1341-my-org-ea-support
Apr 22, 2026
Merged

feat: Add My Org client references and expand organization connection sync#1367
kushalshit27 merged 15 commits intomasterfrom
DXCDT-1341-my-org-ea-support

Conversation

@kushalshit27
Copy link
Copy Markdown
Contributor

🔧 Changes

  • Add support for clients[].my_organization_configuration in the client handler schema and import/export flows so tenant configs can reference connection profiles and user attribute profiles by name instead of hard-coded Auth0 IDs.
  • Expand organization connection support to handle organization_connection_name, organization_access_level, and is_enabled.

Examples

YAML format

Client with My Organization configuration:

clients:
  - name: "My Organization App"
    app_type: "regular_web"
    my_organization_configuration:
      user_attribute_profile_id: "My User Attribute Profile"
      connection_profile_id: "My Connection Profile"
      allowed_strategies:
        - "okta"
        - "samlp"
      connection_deletion_behavior: "allow_if_empty"

Organization connection with expanded fields:

organizations:
  - name: "My Organization"
    connections:
      - connection_id: "con_123456"
        organization_connection_name: "Workforce SSO"
        assign_membership_on_login: true
        show_as_button: true
        is_signup_enabled: false
        is_enabled: true
        organization_access_level: "admin"

JSON format

Client with My Organization configuration:

{
  "name": "My Organization App",
  "app_type": "regular_web",
  "my_organization_configuration": {
    "user_attribute_profile_id": "My User Attribute Profile",
    "connection_profile_id": "My Connection Profile",
    "allowed_strategies": ["okta", "samlp"],
    "connection_deletion_behavior": "allow_if_empty"
  }
}

Organization connection with expanded fields:

{
  "name": "My Organization",
  "connections": [
    {
      "connection_id": "con_123456",
      "organization_connection_name": "Workforce SSO",
      "assign_membership_on_login": true,
      "show_as_button": true,
      "is_signup_enabled": false,
      "is_enabled": true,
      "organization_access_level": "admin"
    }
  ]
}

🔬 Testing

  • Run the targeted unit tests that cover the new client export/import behavior:
    • npm test -- test/context/directory/clients.test.js
    • npm test -- test/context/yaml/clients.test.js
    • npm test -- test/tools/auth0/handlers/clients.tests.js

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

…8.58.1

src/tools/auth0/handlers/organizations.ts: refactor connection handling to use client pool for task management
src/tools/auth0/handlers/userAttributeProfiles.ts: remove default value for scim_mapping in schema
…o schema and update comparison logic

- src/tools/auth0/handlers/organizations.ts: add organization_connection_name and organization_access_level properties
- src/tools/auth0/handlers/organizations.ts: update comparison logic to include new properties
fix(src/tools/auth0/handlers/clients.ts): replace enum values with Management.ClientMyOrganizationConfigurationAllowedStrategiesEnum
fix(src/tools/auth0/handlers/clients.ts): replace enum values with Management.ClientMyOrganizationDeletionBehaviorEnum
@kushalshit27 kushalshit27 requested a review from a team as a code owner April 19, 2026 05:11
@kushalshit27 kushalshit27 marked this pull request as draft April 19, 2026 05:26
…abledConnections to connections

refactor(test/tools/auth0/handlers/organizations.tests.js): update add method to create
refactor(test/tools/auth0/handlers/organizations.tests.js): update list method for connections
@kushalshit27 kushalshit27 marked this pull request as ready for review April 20, 2026 03:27
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 76.56250% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.05%. Comparing base (942c88f) to head (2aa8eab).

Files with missing lines Patch % Lines
src/tools/auth0/handlers/clients.ts 76.47% 0 Missing and 8 partials ⚠️
src/context/directory/handlers/clients.ts 66.66% 0 Missing and 4 partials ⚠️
src/context/yaml/handlers/clients.ts 81.81% 0 Missing and 2 partials ⚠️
src/tools/auth0/handlers/organizations.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1367      +/-   ##
==========================================
- Coverage   80.07%   80.05%   -0.02%     
==========================================
  Files         152      152              
  Lines        6213     6257      +44     
  Branches     1291     1307      +16     
==========================================
+ Hits         4975     5009      +34     
- Misses        703      704       +1     
- Partials      535      544       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/tools/auth0/handlers/organizations.ts Outdated
…handling

- src/tools/auth0/handlers/organizations.ts: replace pool.addEachTask with Promise.all for creating connections
- src/tools/auth0/handlers/organizations.ts: replace pool.addEachTask with Promise.all for updating connections
- src/tools/auth0/handlers/organizations.ts: replace pool.addEachTask with Promise.all for adding connections
- src/tools/auth0/handlers/organizations.ts: replace pool.addEachTask with Promise.all for removing connections
…for created organization ID

- src/tools/auth0/handlers/organizations.ts: replace 'created.id' with 'createdId' in connection creation
- src/tools/auth0/handlers/organizations.ts: replace 'created.id' with 'createdId' in client grants creation
@kushalshit27 kushalshit27 marked this pull request as draft April 20, 2026 08:24
ankita10119
ankita10119 previously approved these changes Apr 20, 2026
@ankita10119 ankita10119 dismissed their stale review April 20, 2026 08:45

As the PR is moved out for review and converted to draft, will review it again once it is out for review

@kushalshit27 kushalshit27 marked this pull request as ready for review April 22, 2026 04:44
Comment thread src/tools/auth0/handlers/organizations.ts
@kushalshit27 kushalshit27 merged commit af14235 into master Apr 22, 2026
9 checks passed
@kushalshit27 kushalshit27 deleted the DXCDT-1341-my-org-ea-support branch April 22, 2026 06:46
@ankita10119 ankita10119 mentioned this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants