Skip to content

addUsersToAlbum fails if any user is already a member #28880

@timonrieger

Description

@timonrieger

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

If you call addUsersToAlbum with multiple users and one of them is already a member of the album, the entire request fails rather than adding the remaining users.

Expected: Skip already-existing members, add the rest, return partial results or a clear per-user status.

Actual: Request fails with an error for the duplicate user; no users are added.

The OS that Immich Server is running on

Version of Immich Server

v2.7.5

Version of Immich Mobile App

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

na

Your .env content

na

Reproduction steps

  1. Add a single user (Bob) to an album so he becomes a member:
    PUT /api/albums/{albumId}/users {"albumUsers":[{"userId":"<bob-id>","role":"viewer"}]}
  2. In one request, add Bob (already a member) and Alice (not yet a member):
    PUT /api/albums/{albumId}/users {"albumUsers":[{"userId":"<bob-id>","role":"viewer"},{"userId":"<alice-id>","role":"viewer"}]}
    => Returns 400 Bad Request: {"message":"User already added"}
  3. Check the album's member list — Alice was not added.

Relevant log output

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions