# Bug OP-16323 - Deletion of users who have created authorization providers (SAML, OIDC) silently fails

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-16323

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.1.1 |
| Observed in versions | 15.1.0 |
| Sprint | 15.1.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 15.1.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Oliver Günther |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  As an admin, create another admin user

2.  As the other user, create a new SAML provider (no need to fully configure it)

3.  As the initial admin, try deleting the other admin user

### What is the buggy behavior?

  - A notification is shown that the user will be deleted in the background

  - The user will, in fact, never be deleted

### What is the expected behavior?

  - The user should be deleted

### Environment information

**OpenProject version**

*v15.1.0*

### Remarks

  - this fails due to a foreign key constraint on the authorization provider table

  - one could show an error saying as much

  - but it would still be tedious having to re-create the auth provider

  - perhaps auth providers shouldn't have authors, or they should be substituted with the deleted user in the delete principals job
