# Bug NEX-599 - [backport] Shown wrong message "Unauthorized to connect to Openproject" on Single-Sign-On setup

Project: Stream Nextcloud app "OpenProject Integration"
Status: closed
URL: https://community.openproject.org/work_packages/NEX-599

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | Nextcloud Integration 3.1.0 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

Step 1: Set up **integration\_openproject** with Single Sign On (SSO) where nextcloud\_hub or keycloak as IDP

Step 2: Create a user in **Nextcloud** and log in

Step 3: Sign in to **OpenProject** using the SSO button.

Step 4: In **Nextcloud**, navigate to `Settings > Openproject`

### What is the buggy behavior?

  - shows  "Unauthorized to connect to Openproject" even though features like creating and linking work packages work fine.
    
    <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/920505/content">

### What is the expected behavior?

  - Should show user is connected as an OpenProject user.

### Environment information

integration\_openproject `2.11` and also on `3.0`

nextcloud `31`

**OpenProject installation type**

  - Docker-compose installation

**OpenProject version**

*If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.1.5*

**Browser**

- [x] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [ ] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [x] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
