# Feature OP-20423 - External invite system

Project: OpenProject
Status: new
URL: https://community.openproject.org/work_packages/OP-20423

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Modules and project features / Email notifications, API / Webhooks, Authentication / OpenID Connect (OIDC) |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers | Arthur Bonic |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** an OpenProject admin  
**I want to** offload the invitation mechanism to an external system  
**so that** user invites and user creation can be processed in the (OIDC) identity provider instead of OpenProject

**Current situation**

*   OpenProject-only setup: OpenProject provides a user invite flow
    
*   IDP-setup: the current process is complex, lengthy and error prone.&nbsp;
    
    1.  Try to find out who can create a new user in the IDP
        
    2.  Wait the LDAP poll to run
        
    3.  Add the user to the object
        

**Motivation**

Make it as easy as possible to collaborate with new users. It needs to be easy but secure.

**Acceptance criteria**

*   When a user is invited to a project, no email should be sent to the user from OpenProject.
    
*   Instead, a configurable webhook should be sent to an external system.
    
*   Re-sending the invitation in OpenProject should re-trigger the webhook.
    
*   The webhook must support JSON and be flexible in its structure.
    
*   Webhook authentication must be supported via bearer tokens and mTLS.
    
*   The system must be tested against Keycloak.
    
    *   Users must receive an invite email from Keycloak.
        
    *   When clicking the link, users must be able to log in.
        
    *   (Stretch goal) the link should lead the user to the project they are invited to.
        
*   Webhooks must have a configurable timeout.
    
    *   (Stretch goal) webhooks should be retried on failure.
        
    *   Webhook failures must be logged or communicated to the user.
        
*   Documentation must be present on setting up the webhook, including Keycloak.
    

**Technical notes**

*   In Keycloak, the correct endpoint is `/admin/realms/{realm}/organizations/{org-id}/members/invite-user`.
    

**Permissions and visibility considerations**

*   _The webhook configuration should be configurable for the instance admin, not on a per-project level._
    
*   _The flow should look identical to a project admin as it currently does._
    

**Translation considerations**

*   Error messages for webhook failures may need to be translated.
    

**Out of scope**

*   The reverse mechanism (e.g. provisioning via SCIM from KeyCloak) is not in scope for this work package.
