Solved

Unable to remove domain from Office 365. Please help!

Posted on 2016-07-17
6
77 Views
Last Modified: 2016-07-17
In the middle of an Office 365 to Office 365 migration. Client has lots of domains and I have moved most of them. Last (and of course, main!) domain still in the old Tenant. Last two domains:
1.JPGWhen I try to remove the client's domain:
2.JPGSo, running powershell and there is nothing with the clients domain:
3.JPGDoing a little digging I have found one item which seems to be some kind of external user who some has shared content with:
4.JPG
I cannot seem to remove this item

Any ideas?

This is holding up the whole migration!!

Thanks
Mark
0
Comment
Question by:Mark Galvin
  • 3
  • 3
6 Comments
 
LVL 38

Expert Comment

by:Vasil Michev (MVP)
ID: 41715872
Apart from email aliases, you need to also check UPNs, SIP addresses, other services. There's a script that can help you with that on TechNet: https://gallery.technet.microsoft.com:443/How-to-remove-a-custom-6fe91693
0
 
LVL 38

Accepted Solution

by:
Vasil Michev (MVP) earned 500 total points
ID: 41715875
Oh, and to remove the external user, use Remove-MsolUser, then remove him from the recycle bin as well. You can check all of them via:

Get-MsolUser | ? {$_.UserType -eq "Guest"}

Open in new window

0
 
LVL 13

Author Comment

by:Mark Galvin
ID: 41715887
Hi Vasil

I was able to remove other domains where accounts held @domain as secondary email addresses so im 99% convinced that its this odd external user.

Running the Get-MsolUser | ? {$_.UserType -eq "Guest"} I get:
Get-MsolUser : An error occurred during authentication. Please retry your operation. If this problem persists, contact Technical Support.
At line:1 char:1
+ Get-MsolUser | ? {$_.UserType -eq "Guest"}
+ ~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Onlin...omation.GetUser:GetUser) [Get-MsolUser], WindowsLiveException
    + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.WindowsLiveException: An error occurred during authentication. Please retry your ope
   ration. If this problem persists, contact Technical Support.
   at Microsoft.Online.Administration.Automation.LiveIdentityManager.GetAuthenticationStatus(String siteName)
   at Microsoft.Online.Administration.Automation.LiveIdentityManager.LogonPassport(String policy, String siteName)
   at Microsoft.Online.Administration.Automation.ConnectMsolService.UpdateLiveToken()
       at Microsoft.Online.Administration.Automation.BecWebServiceProxyRetryAction.CheckRetry(Exception exception, Int32 sleepTime, MsolCmdlet currentCmdlet)

   at Microsoft.Online.Administration.Automation.RetryManager.CheckRetry(Exception exception, Int32 sleepTime, MsolCmdlet currentCmdlet)
       at Microsoft.Online.Administration.Automation.CommonFunctions.InvokeWebServiceMethodWithRetry(String methodName, Request request, MsolCmdlet currentCm
   dlet, Boolean fromRetry, Boolean fromBindingRedirection)
   at Microsoft.Online.Administration.Automation.GetUser.GetList(SearchDefinition searchDefinition)
       at Microsoft.Online.Administration.Automation.MsolCmdlet.ProcessList(SearchDefinition searchDefinition, Int32 maxResultsSize),Microsoft.Online.Adminis
   tration.Automation.GetUser

Open in new window


Any ideas on trying to discover what object type it is?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 38

Expert Comment

by:Vasil Michev (MVP)
ID: 41715908
The error message above is connectivity issue, not related to the cmdlet.

In any case, run the script or do a simple

Get-MsolUser -DomainName domain.com

Open in new window


to find any remaining objects.
0
 
LVL 13

Author Comment

by:Mark Galvin
ID: 41715915
You're a genius!!
5.JPG
0
 
LVL 13

Author Closing Comment

by:Mark Galvin
ID: 41715916
Nice one Vasil!! Guest user removed and so is the Clients domain!
0

Featured Post

Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now