'Stale' O365 group creating problem...


I have a problem with a couple of my O365 groups, all the others behaves normally, but here is an example on the contrary.  I first check if group 'pedagogisk' exists using O365 PS:

PS> Get-DynamicDistributionGroup -Identity "pedagogisk@mydomain.com" | format-list
  The operation couldn't be performed because object 'pedagogisk@mydomain.com'
  couldn't be found on 'AM3PR03A004DC05.EURPR03A114.PROD.OUTLOOK.COM'.
    + CategoryInfo          : NotSpecified: (:) [Get-DynamicDistributionGroup]
   , ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=DB4PR03MB0751,RequestId=1297ba63-1d92-4c
   ec-a379-2a976864c7e0,TimeStamp=15.11.2015 13:41:57] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] F5FC50C1,
    + PSComputerName        : outlook.office365.com

Open in new window

You see here that I get an ObjectNotFound exception.  Because of that I assume that it's ok to create a new group of the same name, which I do here:

PS> New-DistributionGroup -Name "Pedagogisk" -DisplayName "PedGroup" -Alias "pedagogisk" 
   -type "Security" -PrimarySmtpAddress "pedagogisk@mydomain.com"
  Active Directory operation failed on AM3PR03A114DC05.EURPR03A114.PROD.OUTLOOK.COM. 
  The object 'CN=Pedagogisk,OU=mydomain.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,
  DC=EURPR03A004,DC=PROD,DC=OUTLOOK,DC=COM' already exists.
    + CategoryInfo          : NotSpecified: (:) [New-DistributionGroup], ADObjectAlreadyExistsException
    + FullyQualifiedErrorId : [Server=DB4PR03MB0751,RequestId=6aba9420-f2b6-49b9-bc29-f31c83a7b35d,
  TimeStamp=15.11.2015 13:44:48] [FailureCategory=Cmdlet-ADObjectAlreadyExistsException] 4A1B0251,
    + PSComputerName        : outlook.office365.com

Open in new window

But here I get an ADObjectAlreadyExists exception.  How come, I just checked and there was no group with this ID..?
I have searched any coin of O365 and Exchange Online to find such a group, but to no avail.

Might this be some kind of stale group that is hidden from most commands or tools.  What is going on here..?

Thanks for comments

regards Tor

New-DistributionGroup -Name "TestGroup" -DisplayName "TestDisplay" -Alias "test" -type "Security" -PrimarySmtpAddress "test@mydomain.com"
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vasil Michev (MVP)Commented:
The easiest way to check if an object with the same SMTP already exists is the Get-Recipient cmdlet:

 Get-Recipient pedagogisk@mydomain.com

Open in new window

And unfortunately, with the introduction of the new, "modern" groups, Microsoft is yet to update the cmdlet to support those. So apart from the cmdlet above, you should check this as well:

Get-Recipient pedagogisk@mydomain.com  -RecipientTypeDetails GroupMailbox

Open in new window

If both of the cmdlets dont return a matching object, send an email to said alias and perform a trace to see where it ends up.
Vasil Michev (MVP)Commented:
Oh, but in your case you get an error for matching DN, not SMTP address. So run this instead:

Get-Recipient 'CN=Pedagogisk,OU=mydomain.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations, DC=EURPR03A004,DC=PROD,DC=OUTLOOK,DC=COM'

Open in new window

datatorAuthor Commented:

I played a bit with these, and it cooks down to now getting a hit on:

PS> Get-Recipient -identity "pedagogisk"
Name                                    RecipientType
----                                    -------------
Pedagogisk                              MailUniversalSecurityGroup

Open in new window

(I don't get this hit in Exchange Online GUI)  However I modified a distribution group which had 'pedagogisk' as secondary smtp address (for the mydomain.onmicrosoft.com domain) about one week ago.  I have checked this group in the Exchange online GUI several times and it always displays the new smtp name (which is just "ped", so I don't understand why this abandoned address seems to stick for so long time.

I don't want to try a
Remove-DistributionGroup -identity "pedagogisk@mydomain.onmicrosoft.com"
.. because the group itself contains many members and I don't want to re-add those manually.

Does Exchange spare former smtp addresses used in dist groups somewhere?  As I said the "pedagogisk" smtp address doesn't appear in any property in the Echange gui and I just wonder how I can clear the offending "pedagogisk" address that seems to be hidden down in some dungeon...

Btw how do I trace an outgoing email?  I do that for incoming messages by studying the header...

regards Tor
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Vasil Michev (MVP)Commented:
The error you were getting above is not because of the email alias, it's the DN that matches. You have the 'alias' attribute matching it seems, not any of the actual email aliases. Either dont use the alias parameter when creating the new group or use a value different from 'Pedagogisk'.

Same applies for the Name parameter btw.
datatorAuthor Commented:
Ok, I see.

So there is no way to delete the offending DN in Exchange as it is not in use any more...?

regards Tor
Vasil Michev (MVP)Commented:
You can delete it, the question is do you want to?  As mentioned above, it's not the email address that's already in use, it's the DN. So you can just create a new DL with the email address you want simply by using a new name/alias value, which in turn will generate a new DN (i.e. no matches with the already existing DN).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
datatorAuthor Commented:
I created a new group,  to avoid the hassle.  Thanks for the explanations :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Office 365

From novice to tech pro — start learning today.