getting an error when trying to set up a dynamic ditribution list

Tanya Vandermaat 45 Reputation points
2024-01-09T00:54:19.8+00:00

here is the error that comes up when trying to set up a DDL

Can't set Microsoft.Exchange.Management.RecipientTasks.NewDynamicDistributionGroup with value 1 with either direct assignment or parse: Microsoft.Exchange.Admin.OData.Core.ODataServiceException: Attempt to set IncludedRecipients as enum value failed: Failed to locate flag enum string '1' in the type 'WellKnownRecipientType' at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.HandleEnumValue(String propertyName, Type targetEnumType, String incomingRawValue) at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.SetParameterValue(PropertyInfo property, Object obj, Object value) System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider`1.SetParameterValue(PropertyInfo property, Object obj, Object value).

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
{count} votes

Accepted answer
  1. Anonymous
    2024-01-09T02:15:51.78+00:00

    Hello Tanya Vandermaat

    It is mentioned here that you could try Exchange Online Shell.

    https://www.reddit.com/r/Office365/comments/18sqo6s/trying_to_create_a_dynamic_distribution_group/

    (Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)

    Regards

    SF


    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    1 person found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. Antonio Brandao 0 Reputation points
    2024-01-09T01:45:42.27+00:00

    Hi Tanya Vandermaat,

    The error you're encountering while trying to set up a Dynamic Distribution List (DDL) in Microsoft Exchange seems to be related to an incorrect or incompatible value being used in the process.

    Problem:
    Issue with Value '1': The error message indicates an attempt to set a property (likely IncludedRecipients) with the value '1', which isn't recognized. In the context of Dynamic Distribution Groups, IncludedRecipients it is typically set to a specific recipient type like 'MailboxUsers,' 'MailContacts,' etc.

    Possible Solution
    Check the Value of IncludedRecipients: Ensure that you're using a valid value for the IncludedRecipients property. It should be a string corresponding to a recipient type understood by Exchange, like 'MailboxUsers,' 'MailContacts,' 'MailGroups,' etc., not a numeric value like '1'.

    All the best


  2. Eftima Radichkova - ADC 0 Reputation points
    2024-01-09T08:32:46.8866667+00:00

    I'm getting the same error no matter what I select, there seems to be an issue on MS end. Here is my error;

    Can't set Microsoft.Exchange.Management.RecipientTasks.NewDynamicDistributionGroup with value 1 with either direct assignment or parse: Microsoft.Exchange.Admin.OData.Core.ODataServiceException: Attempt to set IncludedRecipients as enum value failed: Failed to locate flag enum string '1' in the type 'WellKnownRecipientType' at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.HandleEnumValue(String propertyName, Type targetEnumType, String incomingRawValue) at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.SetParameterValue(PropertyInfo property, Object obj, Object value) System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider`1.SetParameterValue(PropertyInfo property, Object obj, Object value).


  3. VB 0 Reputation points
    2024-01-10T15:50:45.21+00:00

    Same problem here - and there is no place I personally did or can set the value '1' (which isn't recognized). This needs a better explanation.

    0 comments No comments

  4. Paul Rolland 80 Reputation points
    2024-01-10T18:29:01.65+00:00

    Same problem here using admin.exchange.microsoft.com: attempting to create a Dynamic Distribution List fails miserably with:
    Can't set Microsoft.Exchange.Management.RecipientTasks.NewDynamicDistributionGroup with value -1 with either direct assignment or parse: Microsoft.Exchange.Admin.OData.Core.ODataServiceException: Attempt to set IncludedRecipients as enum value failed: Failed to locate flag enum string '-1' in the type 'WellKnownRecipientType' at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.HandleEnumValue(String propertyName, Type targetEnumType, String incomingRawValue) at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.SetParameterValue(PropertyInfo property, Object obj, Object value) System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider`1.SetParameterValue(PropertyInfo property, Object obj, Object value).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.