duplicati/duplicati · error · UserInformationException

MicrosoftGroupNoGroupsWithEmail

MicrosoftGroupNoGroupsWithEmail

Error message

No groups were found with the given email address: {0}

What it means

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.

Source

Thrown at Duplicati/Library/Backend/OneDrive/MicrosoftGroup.cs:93

            return drivePath;
        }

        protected override DescriptionTemplateDelegate DescriptionTemplate => Strings.MicrosoftGroup.Description;

        protected override IList<ICommandLineArgument> AdditionalSupportedCommands => [
                    new CommandLineArgument(GROUP_ID_OPTION, CommandLineArgument.ArgumentType.String, Strings.MicrosoftGroup.GroupIdShort, Strings.MicrosoftGroup.GroupIdLong),
                    new CommandLineArgument(GROUP_EMAIL_OPTION, CommandLineArgument.ArgumentType.String, Strings.MicrosoftGroup.GroupEmailShort, Strings.MicrosoftGroup.GroupEmailLong),
                ];

        private async Task<string> GetGroupIdFromEmailAsync(string email, CancellationToken cancelToken)
        {
            // We can get all groups that have the given email as one of their addresses with:
            // https://graph.microsoft.com/v1.0/groups?$filter=mail eq '{email}' or proxyAddresses/any(x:x eq 'smtp:{email}')
            string request = string.Format("{0}/groups?$filter=mail eq '{1}' or proxyAddresses/any(x:x eq 'smtp:{1}')", this.ApiVersion, email);
            var groups = await Utility.Utility.WithTimeout(m_timeouts.ShortTimeout, cancelToken, ct => GetAsync<GraphCollection<Group>>(request, ct)).ConfigureAwait(false);
            if (groups.Value == null || groups.Value.Length == 0)
                throw new UserInformationException(Strings.MicrosoftGroup.NoGroupsWithEmail(email), "MicrosoftGroupNoGroupsWithEmail");

            if (groups.Value.Length > 1)
                throw new UserInformationException(Strings.MicrosoftGroup.MultipleGroupsWithEmail(email), "MicrosoftGroupMultipleGroupsWithEmail");

            var id = groups.Value.Single().Id;
            if (string.IsNullOrEmpty(id))
                throw new UserInformationException(Strings.MicrosoftGroup.NoGroupsWithEmail(email), "MicrosoftGroupNoGroupsWithEmail");

            return id;
        }
    }
}

View on GitHub (pinned to 3f348be3e3)

Solutions

  1. Confirm the exact group email in the Microsoft 365 admin center / Azure AD portal.
  2. Ensure the account used for OAuth has permission to read group memberships (Group.Read.All or similar).
  3. Prefer the group's immutable --group-id instead of the email to avoid name-resolution failures.
  4. Verify the group type is 'Microsoft 365 group' (unified) — other group types may not be matched by this filter.

Example fix

// before
--group-email=finanace@contoso.com   // typo

// after
--group-email=finance@contoso.com
// or stable:
--group-id=00000000-0000-0000-0000-000000000000
Defensive patterns

Strategy: validation

Validate before calling

// Validate the email format before letting the backend resolve it
if (!System.Text.RegularExpressions.Regex.IsMatch(groupEmail, @"^[^@\s]+@[^@\s]+\.[^@\s]+$"))
    throw new InvalidOperationException("group-email is not a valid email address.");

Try / catch

try { return await group.GetGroupIdFromEmailAsync(email, ct); }
catch (UserInformationException ex) when (ex.HelpID == "MicrosoftGroupNoGroupsWithEmail")
{ SuggestSwitchToGroupIdOption(); throw; }

Prevention

When it happens

Trigger: GetGroupIdFromEmailAsync: groups.Value == null || groups.Value.Length == 0 after a successful Graph GET for the given email filter.

Common situations: 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.

Related errors


AI-assisted analysis of duplicati/duplicati@3f348be3e3 (2026-08-13). Data as JSON: /api/errors/008a1088a691087d. Report an issue: GitHub.