timmcmic / DLConversionV2

MIT License
44 stars 9 forks source link

Error: Address somename@ could not be added to new cloud distribution group. Manual addition required. #125

Closed TPok1707 closed 1 year ago

TPok1707 commented 1 year ago

I just upgraded to version 2.9.6.6 and now I get the same error message for all migration jobs. This looks to me like some address parsing bug.

Anonymized Log snipped:

[23.02.2023 10:48:46] - A hybrid remote routing address was not present.  Adding hybrid remote routing address.
[23.02.2023 10:48:46] - Calculated hybrid remote routing address = some.name@
[23.02.2023 10:48:46] - Determine if the calcualted routing address is already in use.
[23.02.2023 10:48:46] - Calculated hybrid remote routing address is not present - continue.
[23.02.2023 10:48:46] - Error processing address: some.name@
Write-ErrorMessage : Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value 
"System.Collections.Generic.Dictionary`2[System.String,System.Object]" to type 
"Microsoft.Exchange.Data.ProxyAddressCollection". Error: "The address 'some.name@' is invalid: The address 
'some.name@' isn't a valid Unified Messaging address, so a prefix must be specified."
At C:\Users\s.fietzek\AppData\Local\Temp\tmpEXO_yeotnggm.l51\tmpEXO_yeotnggm.l51.psm1:1101 char:13
+             Write-ErrorMessage $ErrorObject
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-DistributionGroup], ParameterTransformationException
    + FullyQualifiedErrorId : [Server=DU0PR08MB7762,RequestId=e65f39dd-b4c2-c279-15b0-d3d60a6f680d,TimeStamp=Thu, 23 F 
   eb 2023 09:48:46 GMT],Write-ErrorMessage

Name                      : Some Name
Alias                     : some.name
PrimarySMTPAddressorUPN   : some.name@company.com
ExternalDirectoryObjectID : 3eea8f1b-7746-4861-92bf-1a86b036e574
ErrorMessageDetail        : Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value 
                            "System.Collections.Generic.Dictionary`2[System.String,System.Object]" to type 
                            "Microsoft.Exchange.Data.ProxyAddressCollection". Error: "The address 'some.name@' is 
                            invalid: The address 'some.name@' isn't a valid Unified Messaging address, so a prefix 
                            must be specified."
Attribute                 : Cloud Proxy Addresses
ErrorMessage              : Address some.name@ could not be added to new cloud distribution group.  Manual addition 
                            required.

[23.02.2023 10:48:46] - Remove the SMTP Address added by creating the temporary DL.
[23.02.2023 10:48:46] - Removing: 20230223T10435929161801342289@company.onmicrosoft.com
[23.02.2023 10:48:46] - END SET-Office365DLMV

I can provide a full log directly but not in public.

Looking at the migrated distribution list, everything looks fine to me despite the error message.

timmcmic commented 1 year ago

Thank you for the snippet - I'm not sure why this is randomly failing when it's not failing in test cases. I've reproing both success and failure.

I changed the logic for calculating the routing domain to account for a customized domain. The variable for the customer domain was set to NULL and there is an IF statement that triggeres pulling the onmicrosoft.com domain. This is skipped if the administrator specifies this. For whatever reason this is working at times and not.

I changed the string initialization to just be a blank string "" and the if statement to test for this. I'm now 100% in the stress tests.

Version .7 will go live here shortly that has this fixed.

Tim

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday - Wednesday 08:00 - 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================

From: TPok1707 @.> Sent: Thursday, February 23, 2023 5:53 AM To: timmcmic/DLConversionV2 @.> Cc: Subscribed @.***> Subject: [timmcmic/DLConversionV2] Error: Address somename@ could not be added to new cloud distribution group. Manual addition required. (Issue #125)

I just upgraded to version 2.9.6.6 and now I get the same error message for all migration jobs. This looks to me like some address parsing bug.

Anonymized Log snipped:

[23.02.2023 10:48:46] - A hybrid remote routing address was not present. Adding hybrid remote routing address.

[23.02.2023 10:48:46] - Calculated hybrid remote routing address = some.name@

[23.02.2023 10:48:46] - Determine if the calcualted routing address is already in use.

[23.02.2023 10:48:46] - Calculated hybrid remote routing address is not present - continue.

[23.02.2023 10:48:46] - Error processing address: some.name@

Write-ErrorMessage : Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value

"System.Collections.Generic.Dictionary`2[System.String,System.Object]" to type

"Microsoft.Exchange.Data.ProxyAddressCollection". Error: "The address 'some.name@' is invalid: The address

'some.name@' isn't a valid Unified Messaging address, so a prefix must be specified."

At C:\Users\s.fietzek\AppData\Local\Temp\tmpEXO_yeotnggm.l51\tmpEXO_yeotnggm.l51.psm1:1101 char:13

Name : Some Name

Alias : some.name

PrimarySMTPAddressorUPN : @.**@.>

ExternalDirectoryObjectID : 3eea8f1b-7746-4861-92bf-1a86b036e574

ErrorMessageDetail : Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value

                        "System.Collections.Generic.Dictionary`2[System.String,System.Object]" to type

                        "Microsoft.Exchange.Data.ProxyAddressCollection". Error: "The address 'some.name@' is

                        invalid: The address 'some.name@' isn't a valid Unified Messaging address, so a prefix

                        must be specified."

Attribute : Cloud Proxy Addresses

ErrorMessage : Address some.name@ could not be added to new cloud distribution group. Manual addition

                        required.

[23.02.2023 10:48:46] - Remove the SMTP Address added by creating the temporary DL.

[23.02.2023 10:48:46] - Removing: @.**@.>

[23.02.2023 10:48:46] - END SET-Office365DLMV

I can provide a full log directly but not in public.

Looking at the migrated distribution list, everything looks fine to me despite the error message.

- Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F125&data=05%7C01%7Ctimmcmic%40microsoft.com%7C32464c609ead4659694608db158c133b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638127463587678845%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dkr2F%2BPzdSHQObxWwyEBT0mzT8z3elctdTKj2Vx5WY0%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6K43U7ZP27IZSCRDDTWY46PJANCNFSM6AAAAAAVFO7FVQ&data=05%7C01%7Ctimmcmic%40microsoft.com%7C32464c609ead4659694608db158c133b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638127463587678845%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0cXFNvN7LsQ%2BUanM0ZWXdvH4kb4eS%2FvbDvFmEUKeuU4%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

timmcmic commented 1 year ago

Confirming you should now see this resolved?

smtp25gmailcom commented 1 year ago

I got this to too, and it was Azure AD guests, I had to add them manually.

timmcmic commented 1 year ago

Azure AD guest accounts cannot be members of distribution lists unless it is a guest account synced from on premise.

Could you by chance provide logs or more specifics?

This issue was fixed already in the other case.

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday - Wednesday 08:00 - 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================

From: smtp25gmailcom @.> Sent: Thursday, March 16, 2023 5:50 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Error: Address somename@ could not be added to new cloud distribution group. Manual addition required. (Issue #125)

I got this to too, and it was Azure AD guests, I had to add them manually.

- Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F125%23issuecomment-1471627427&data=05%7C01%7Ctimmcmic%40microsoft.com%7Cf050a8bc43d54d9348ad08db2603bf99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638145569767507394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3F7xbdcMNog3W7JsBbH0Uhn8dsPgcgCif5R0vrjZxAo%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6LO7NSMWROLK5CUIKDW4LO23ANCNFSM6AAAAAAVFO7FVQ&data=05%7C01%7Ctimmcmic%40microsoft.com%7Cf050a8bc43d54d9348ad08db2603bf99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638145569767663630%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=upptYifnN1TbC%2Fqada%2B2q8YeCRhfLLeDKvc%2BrxSYJxA%3D&reserved=0. You are receiving this because you commented.Message ID: @.**@.>>