nextcloud / nextcloud/circles

Cannot add LDAP Users to Teams

Open
#2,521 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
JavaScript
Stars
177
Forks
68
Avg merge
2d 22h
Merged PRs (30d)
60

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce
  1. Click on Team
  2. Click on Add
  3. Search for User > User is found
  4. Select User and click Add to Team > "Some members could not be added"
Expected behaviour

Users from LDAP Backend can be added to Teams

Actual behaviour

Lokal Users can be added without any issues.
When trying to add users from LDAP Backend to a Team it fails with the Message "Some members could not be added"
Deleting the user and letting it get recreated by LDAP fixes the issue. But thats not a practical solution.
The nextcloud.log shows the following error:

{"reqId":"0flP1bZaLhy0vLvwwZXZ","level":3,"time":"2026-06-15T08:49:04+00:00","remoteAddr":"x.xxx.xxx.xx","user":"xxx","app":"","method":"POST","url":"/ocs/v2.php/apps/circles/circles/VitXSQyDkT3QqImhn6gOITIoLYuRcoa/members/multi","scriptName":"/ocs/v2.php","message":"{"event":""}","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36","version":"33.0.5.1","exception":{"Exception":"OCA\Circles\Exceptions\FederatedUserNotFoundException","Message":"singleId not found","Code":404,"Trace":[{"file":"/var/www/nextcloud/apps/circles/lib/Service/FederatedUserService.php","line":849,"function":"getFederatedUserBySingleId","class":"OCA\Circles\Db\CircleRequest","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/Service/FederatedUserService.php","line":771,"function":"getFederatedUser_SingleId","class":"OCA\Circles\Service\FederatedUserService","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/FederatedItems/SingleMemberAdd.php","line":187,"function":"getFederatedUser","class":"OCA\Circles\Service\FederatedUserService","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/FederatedItems/MassiveMemberAdd.php","line":51,"function":"generateMember","class":"OCA\Circles\FederatedItems\SingleMemberAdd","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/Service/FederatedEventService.php","line":116,"function":"verify","class":"OCA\Circles\FederatedItems\MassiveMemberAdd","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/Service/MemberService.php","line":271,"function":"newEvent","class":"OCA\Circles\Service\FederatedEventService","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/Controller/LocalController.php","line":277,"function":"addMembers","class":"OCA\Circles\Service\MemberService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":205,"function":"membersAdd","class":"OCA\Circles\Controller\LocalController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":61,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":8,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/circles/lib/Db/CircleRequest.php","Line":412,"message":"{"event":""}","exception":"{"class":"OCA\Circles\Exceptions\FederatedUserNotFoundException","message":"singleId not found","code":404,"file":"/var/www/nextcloud/apps/circles/lib/Db/CircleRequest.php:412","trace":"#0 /var/www/nextcloud/apps/circles/lib/Service/FederatedUserService.php(849): OCA\Circles\Db\CircleRequest->getFederatedUserBySingleId()\n#1 /var/www/nextcloud/apps/circles/lib/Service/FederatedUserService.php(771): OCA\Circles\Service\FederatedUserService->getFederatedUser_SingleId()\n#2 /var/www/nextcloud/apps/circles/lib/FederatedItems/SingleMemberAdd.php(187): OCA\Circles\Service\FederatedUserService->getFederatedUser()\n#3 /var/www/nextcloud/apps/circles/lib/FederatedItems/MassiveMemberAdd.php(51): OCA\Circles\FederatedItems\SingleMemberAdd->generateMember()\n#4 /var/www/nextcloud/apps/circles/lib/Service/FederatedEventService.php(116): OCA\Circles\FederatedItems\MassiveMemberAdd->verify()\n#5 /var/www/nextcloud/apps/circles/lib/Service/MemberService.php(271): OCA\Circles\Service\FederatedEventService->newEvent()\n#6 /var/www/nextcloud/apps/circles/lib/Controller/LocalController.php(277): OCA\Circles\Service\MemberService->addMembers()\n#7 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(205): OCA\Circles\Controller\LocalController->membersAdd()\n#8 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(118): OC\AppFramework\Http\Dispatcher->executeController()\n#9 /var/www/nextcloud/lib/private/AppFramework/App.php(153): OC\AppFramework\Http\Dispatcher->dispatch()\n#10 /var/www/nextcloud/lib/private/Route/Router.php(321): OC\AppFramework\App::main()\n#11 /var/www/nextcloud/ocs/v1.php(61): OC\Route\Router->match()\n#12 /var/www/nextcloud/ocs/v2.php(8): require_once('...')\n#13 {main}"}","CustomMessage":"{"event":""}"}}

Server configuration

Web server: Apache

Database: Tested with both PostgreSQL 18.4 and MariaDB 11.8.8

PHP version: Tested with both 8.5 and 8.4

Nextcloud version: Tested with both 33.0.5 and 34.0.0

List of activated apps Note: Disableing all apps did not help ``` Enabled: - activity: 6.0.0 - admin_audit: 1.23.0 - announcementcenter: 7.4.0 - bruteforcesettings: 6.0.0 - calendar: 6.4.2 - camerarawpreviews: 0.9.0 - circles: 33.0.0 - cloud_federation_api: 1.17.0 - collectives: 4.4.1 - comments: 1.23.0 - contacts: 8.5.1 - contactsinteraction: 1.14.1 - dashboard: 7.13.0 - dav: 1.36.0 - deck: 1.17.2 - external: 8.0.1 - federatedfilesharing: 1.23.0 - federation: 1.23.0 - files: 2.5.0 - files_accesscontrol: 4.0.1 - files_automatedtagging: 4.0.0 - files_downloadlimit: 5.1.0 - files_external: 1.25.1 - files_fulltextsearch: 33.0.0 - files_pdfviewer: 6.0.0 - files_reminders: 1.6.0 - files_sharing: 1.25.2 - files_trashbin: 1.23.0 - files_versions: 1.26.0 - flow_notifications: 4.0.0 - forms: 5.2.9 - fulltextsearch: 33.0.0 - fulltextsearch_elasticsearch: 33.0.0 - group_everyone: 0.1.19 - groupfolders: 21.0.7 - impersonate: 4.0.0 - integration_zammad: 4.0.4 - logreader: 6.0.0 - lookup_server_connector: 1.21.0 - nextcloud_announcements: 5.0.0 - notifications: 6.0.0 - notify_push: 1.3.3 - oauth2: 1.21.0 - password_policy: 5.0.0 - privacy: 5.0.0 - profile: 1.2.0 - provisioning_api: 1.23.0 - recommendations: 6.0.0 - related_resources: 4.0.0 - richdocuments: 10.1.3 - serverinfo: 5.0.0 - settings: 1.16.0 - sharebymail: 1.23.0 - side_menu: 5.3.0 - spreed: 23.0.6 - support: 5.0.0 - survey_client: 5.0.0 - suspicious_login: 11.0.0 - systemtags: 1.23.0 - tables: 2.2.0 - tasks: 0.17.1 - text: 7.0.1 - theming: 2.8.0 - theming_customcss: 1.20.0 - twofactor_backupcodes: 1.22.0 - twofactor_nextcloud_notification: 7.0.0 - twofactor_totp: 15.0.0 - updatenotification: 1.23.0 - user_ldap: 1.24.0 - user_saml: 8.1.2 - user_status: 1.13.0 - viewer: 6.0.0 - weather_status: 1.13.0 - webhook_listeners: 1.5.0 - whiteboard: 1.5.9 - workflow_pdf_converter: 4.0.1 - workflow_script: 4.0.0 - workflowengine: 2.15.0 Disabled: - app_api: 33.0.0 (installed 33.0.0) - encryption: 2.21.0 - firstrunwizard: 6.0.0 (installed 5.0.0) - nextcloud-aio: 0.8.0 (installed 0.8.0) - photos: 6.0.0 (installed 4.0.0) - testing: 1.23.0 ```
Nextcloud configuration
{
    "system": {
        "apps_paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/nextcloud\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "33.0.5.1",
        "overwrite.cli.url": "https:\/\***REMOVED SENSITIVE VALUE***\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": "3",
        "log_type": "file",
        "logfile": "\/var\/www\/nextcloud\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "enable_previews": true,
        "upgrade.disable-web": true,
        "trashbin_retention_obligation": "30, 30",
        "versions_retention_obligation": "30, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "maintenance_window_start": 1,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "default_language": "de_DE",
        "default_locale": "de_DE",
        "defaultapp": "",
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "updatechecker": true,
        "app.mail.verify-tls-peer": "false",
        "app_install_overwrite": [],
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "serverid": 0,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_sendmailmode": "smtp",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": true,
                "verify_peer_name": true
            }
        }
    }
}
Browser

Browser name: Firefox/Brave/…

Browser version: unknown…

Operating system: Windows/Mac/…

Browser log
No errors are shown in Browser console or network

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at apps/circles/lib/Db/CircleRequest.php line 412 and follow getFederatedUserBySingleId through FederatedUserService.php, SingleMemberAdd.php, and MassiveMemberAdd.php. Reproduce the Team/Add flow with an LDAP-backed user and use the reported trace to inspect the failed lookup. Done means LDAP users can be added to Teams without deleting and recreating the account.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.