Federation sharing to LDAP-groups fails

Nextcloud version: 20.0.6
Operating system and version: CentOS 8
Apache or nginx version: 1.14.1
PHP version: 7.4.14

The issue you are facing:

Sharing Folders or Files via Federation to an Ldap Group results in an Frontend error Error creating the share.

It is a Samba AD-LDAP. Sharing to LDAP-Groups and LDAP-Users on the target machine works. It is just the addressing like

ldap-group@nextcloud.example.com or `ldap-group@https://nextcloud.example.com``

is not working. ldap-user@nextcloud.example.com works.

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Federation share from nextcloud1.example.com to ldap-group@nextcloud2.example.com
  2. Choose the presented entry ldap-group on nextcloud2.example.com
  3. Flyout Error creating the share appears

The output of your Nextcloud log in Admin > Logging:

{"reqId":"QsIJieDQo5so7zBTymLZ","level":3,"time":"2021-01-28T14:21:33+01:00","remoteAddr":"XXX","user":"XXX","app":"no app in context","method":"GET","url":"/ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&itemType=folder&search=bosses%40&lookup=false&perPage=200&shareType[]=0&shareType[]=1&shareType[]=6&shareType[]=9&shareType[]=7&shareType[]=10&shareType[]=8&shareType[]=4","message":{"Exception":"InvalidArgumentException","Message":"Invalid Federated Cloud ID","Code":0,"Trace":[{"file":"DOCUMENT_ROOT/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php","line":62,"function":"splitGroupRemote","class":"OC\\Collaboration\\Collaborators\\RemoteGroupPlugin","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/Collaboration/Collaborators/Search.php","line":71,"function":"search","class":"OC\\Collaboration\\Collaborators\\RemoteGroupPlugin","type":"->"},{"file":"DOCUMENT_ROOT/apps/files_sharing/lib/Controller/ShareesAPIController.php","line":214,"function":"search","class":"OC\\Collaboration\\Collaborators\\Search","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"search","class":"OCA\\Files_Sharing\\Controller\\ShareesAPIController","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"DOCUMENT_ROOT/ocs/v1.php","line":88,"function":"match","class":"OC\\Route\\Router","type":"->"}],"File":"DOCUMENT_ROOT/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php","Line":92,"Previous":{"Exception":"InvalidArgumentException","Message":"Invalid cloud id","Code":0,"Trace":[{"file":"DOCUMENT_ROOT/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php","line":89,"function":"resolveCloudId","class":"OC\\Federation\\CloudIdManager","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php","line":62,"function":"splitGroupRemote","class":"OC\\Collaboration\\Collaborators\\RemoteGroupPlugin","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/Collaboration/Collaborators/Search.php","line":71,"function":"search","class":"OC\\Collaboration\\Collaborators\\RemoteGroupPlugin","type":"->"},{"file":"DOCUMENT_ROOT/apps/files_sharing/lib/Controller/ShareesAPIController.php","line":214,"function":"search","class":"OC\\Collaboration\\Collaborators\\Search","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"search","class":"OCA\\Files_Sharing\\Controller\\ShareesAPIController","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"DOCUMENT_ROOT/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"DOCUMENT_ROOT/ocs/v1.php","line":88,"function":"match","class":"OC\\Route\\Router","type":"->"}],"File":"DOCUMENT_ROOT/lib/private/Federation/CloudIdManager.php","Line":80},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36","version":"20.0.6.1","id":"6012bcb57d533"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'XXX',
  ),
  'datadirectory' => '/mnt/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '20.0.6.1',
  'overwrite.cli.url' => 'https://XXX/',
  'dbname' => 'nextcloud',
  'dbhost' => '/var/run/postgresql',
  'dbport' => '',
  'dbtableprefix' => 'nc_',
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'instanceid' => 'XXX',
  'log_type' => 'file',
  'logfile' => '/mnt/nextcloud/data/nextcloud.log',
  'loglevel' => '1',
  'log_rotate_size' => 10485760,
  'allow_local_remote_servers' => 'true',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => '0',
    'timeout' => '0.0',
    'dbindex' => 0,
  ),
  'enable_previews' => 'true',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'preview_max_x' => '1024',
  'preview_max_y' => '768',
  'preview_max_scale_factor' => '1',
  'auth.bruteforce.protection.enabled' => 'true',
  'trashbin_retention_obligation' => 'auto, 7',
  'skeletondirectory' => '',
  'defaultapp' => 'file',
  'activity_expire_days' => '14',
  'integrity.check.disabled' => 'false',
  'updater.release.channel' => 'stable',
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'simpleSignUpLink.shown' => false,
  'login_form_autocomplete' => false,
  'logtimezone' => 'Europe/Berlin',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_sendmailmode' => 'smtp',
  'maintenance' => false,
  'theme' => '',
  'app_install_overwrite' =>
  array (
    0 => 'limit_login_to_ip',
    1 => 'mindmap_app',
  ),
);```

The output of your Apache/nginx/system log in `/var/log/____`:

error-log of nginx is empty.

Someone? :slight_smile: Would some more information be helpful? Which?

What kind of community is this here? Careless? :sweat_smile:

HI, did you find any solutions?