API: Resrouce set users endpoint returns 403 when using root API Key #955

Closed
opened 2026-04-05 18:02:59 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @yasalmasri on 9/7/2025

Bug Description

Trying to add user to a resource through Pangolin API with root API Key, but it returns HTTP status code 403 with error message: Key does not have access to this organization, I tried to replicate the same request with organization API Key and it works with no error.

Steps to Reproduce

  • Create Root API Key with all permissions.
  • Make this request:
curl -X POST 'https://pangolin.domain.com/v1/resource/17/users' \
  --header 'Content-Type: application/json' \
  --data '{
  "userIds": [
    "USER_ID"
  ]
}' \
  --header 'Authorization: Bearer ROOT_API_KEY'
  • Response received:
{
  "data": null,
  "success": false,
  "error": true,
  "message": "Key does not have access to this organization",
  "status": 403,
  "stack": null
}

Actual Behavior

API request returns http status code 403.

Expected Behavior

API request should return 201 and user should be added to resource.

Environment

Pangolin Version: 1.9.4
Deployment: Docker (fosrl/pangolin)
OS: Ubuntu 24.10

*Originally created by @yasalmasri on 9/7/2025* ## Bug Description Trying to add user to a resource through Pangolin API with root API Key, but it returns HTTP status code 403 with error message: `Key does not have access to this organization`, I tried to replicate the same request with organization API Key and it works with no error. ## Steps to Reproduce - Create Root API Key with all permissions. - Make this request: ```bash curl -X POST 'https://pangolin.domain.com/v1/resource/17/users' \ --header 'Content-Type: application/json' \ --data '{ "userIds": [ "USER_ID" ] }' \ --header 'Authorization: Bearer ROOT_API_KEY' ``` - Response received: ```json { "data": null, "success": false, "error": true, "message": "Key does not have access to this organization", "status": 403, "stack": null } ``` ## Actual Behavior API request returns http status code 403. ## Expected Behavior API request should return 201 and user should be added to resource. ## Environment Pangolin Version: 1.9.4 Deployment: Docker (fosrl/pangolin) OS: Ubuntu 24.10
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#955