{"record":{"id":"008a1088a691087d","repo":"duplicati/duplicati","slug":"microsoftgroupnogroupswithemail","errorCode":"MicrosoftGroupNoGroupsWithEmail","errorMessage":"No groups were found with the given email address: {0}","messagePattern":"No groups were found with the given email address: (.+?)","errorType":"exception","errorClass":"UserInformationException","httpStatus":null,"severity":"error","filePath":"Duplicati/Library/Backend/OneDrive/MicrosoftGroup.cs","lineNumber":93,"sourceCode":"\n            return drivePath;\n        }\n\n        protected override DescriptionTemplateDelegate DescriptionTemplate => Strings.MicrosoftGroup.Description;\n\n        protected override IList<ICommandLineArgument> AdditionalSupportedCommands => [\n                    new CommandLineArgument(GROUP_ID_OPTION, CommandLineArgument.ArgumentType.String, Strings.MicrosoftGroup.GroupIdShort, Strings.MicrosoftGroup.GroupIdLong),\n                    new CommandLineArgument(GROUP_EMAIL_OPTION, CommandLineArgument.ArgumentType.String, Strings.MicrosoftGroup.GroupEmailShort, Strings.MicrosoftGroup.GroupEmailLong),\n                ];\n\n        private async Task<string> GetGroupIdFromEmailAsync(string email, CancellationToken cancelToken)\n        {\n            // We can get all groups that have the given email as one of their addresses with:\n            // https://graph.microsoft.com/v1.0/groups?$filter=mail eq '{email}' or proxyAddresses/any(x:x eq 'smtp:{email}')\n            string request = string.Format(\"{0}/groups?$filter=mail eq '{1}' or proxyAddresses/any(x:x eq 'smtp:{1}')\", this.ApiVersion, email);\n            var groups = await Utility.Utility.WithTimeout(m_timeouts.ShortTimeout, cancelToken, ct => GetAsync<GraphCollection<Group>>(request, ct)).ConfigureAwait(false);\n            if (groups.Value == null || groups.Value.Length == 0)\n                throw new UserInformationException(Strings.MicrosoftGroup.NoGroupsWithEmail(email), \"MicrosoftGroupNoGroupsWithEmail\");\n\n            if (groups.Value.Length > 1)\n                throw new UserInformationException(Strings.MicrosoftGroup.MultipleGroupsWithEmail(email), \"MicrosoftGroupMultipleGroupsWithEmail\");\n\n            var id = groups.Value.Single().Id;\n            if (string.IsNullOrEmpty(id))\n                throw new UserInformationException(Strings.MicrosoftGroup.NoGroupsWithEmail(email), \"MicrosoftGroupNoGroupsWithEmail\");\n\n            return id;\n        }\n    }\n}\n","sourceCodeStart":75,"sourceCodeEnd":106,"githubUrl":"https://github.com/duplicati/duplicati/blob/3f348be3e33f5d72d414e3ad55839c2ba34dda67/Duplicati/Library/Backend/OneDrive/MicrosoftGroup.cs#L75-L106","documentation":"MicrosoftGroup.GetGroupIdFromEmailAsync throws UserInformationException('MicrosoftGroupNoGroupsWithEmail') at line 93 when the Graph query '/groups?$filter=mail eq '{email}' or proxyAddresses/any(x:x eq 'smtp:{email}')' returns null or an empty collection. No Microsoft 365 group matches the supplied email.","triggerScenarios":"GetGroupIdFromEmailAsync: groups.Value == null || groups.Value.Length == 0 after a successful Graph GET for the given email filter.","commonSituations":"Typo in the group email; the group is a security/Mail-Enabled group rather than a Microsoft 365 group (not returned by this filter); the authenticated service account lacks permission to read the group; the group was deleted or the email changed.","solutions":["Confirm the exact group email in the Microsoft 365 admin center / Azure AD portal.","Ensure the account used for OAuth has permission to read group memberships (Group.Read.All or similar).","Prefer the group's immutable --group-id instead of the email to avoid name-resolution failures.","Verify the group type is 'Microsoft 365 group' (unified) — other group types may not be matched by this filter."],"exampleFix":"// before\n--group-email=finanace@contoso.com   // typo\n\n// after\n--group-email=finance@contoso.com\n// or stable:\n--group-id=00000000-0000-0000-0000-000000000000","handlingStrategy":"validation","validationCode":"// Validate the email format before letting the backend resolve it\nif (!System.Text.RegularExpressions.Regex.IsMatch(groupEmail, @\"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$\"))\n    throw new InvalidOperationException(\"group-email is not a valid email address.\");","typeGuard":null,"tryCatchPattern":"try { return await group.GetGroupIdFromEmailAsync(email, ct); }\ncatch (UserInformationException ex) when (ex.HelpID == \"MicrosoftGroupNoGroupsWithEmail\")\n{ SuggestSwitchToGroupIdOption(); throw; }","preventionTips":["Prefer --group-id over email for production configs.","Verify group emails against the Azure AD portal before configuring.","Ensure the OAuth account has Group.Read.All permission."],"tags":["sharepoint","onedrive","microsoft-graph","configuration","validation","duplicati"],"backgroundTag":null,"analyzedSha":"3f348be3e33f5d72d414e3ad55839c2ba34dda67","analyzedAt":"2026-08-13T16:48:27.008Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}