SOLVED
Home

Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Highlighted
Betty Stolwyk
Occasional Contributor

Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

From within the Teams client application I deleted a team.  However I noticed its associated Sharepoint site is still there.

 

I can manually delete that also, but I just wanted to know if this is how it is supposed to work and what else might I need to delete manually associated with the deleted team?

 

I am running Windows 7 client.

We have an O365 Enterprise E3 license.

 

 

21 Replies

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

The Group Site should be deleted to...other community members has reported that the site is not initially removed, but after some time it's removed

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Yes I confirm Juan Carlos says. When I delete a office365 group I need to wait some times (less than 30 mn) before to see the group site appears deleted.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Hello Juan Carlos, thank you for your answer.  That does not seem to be my situation.  The SharePoint site associated with the deleted Team is still there even more than 24 hours later.

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Hello Marie,

 

I was not deleting the SP site directly, I was deleting a Team from within the Team UI and I had expected the associated SharePoint site to be deleted in the same process automatically.  However, the SP site is still there.  I can delete it manually, but I was not sure if this was a bug in the delete Team process or not.

 

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Seems like a bug to me. did you create the team before GA of teams? normally if you delete the site everthing has to be deleted.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Agree with Paul, that's not correct...I recommend you to open a ticket so support can see what's happening

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Paul,

 

No, I did it recently.  And just to be clear, I was not deleting the site, I was deleting the team from within the client UI, then expecting the SP site to have automatically been deleted, which did not happen.  I am going to attach an image because I don't think I made myself very clear.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Just to make this clear to everyone, this may be a better explanation of what I did.

(And by the way, how do you open a ticket to Support?)

 

I created a test team in Teams Client UI

That automatically creates an Office 365 Group which is exposed in Outlook under Groups.

It also automatically creates a SharePoint site called http://xxxx.xxxx.com/sites/{TeamSiteName}

 

If you see in the attached image, there is an example of what I then tried to do.  I am in the Teams client UI, I right click on a team I had created, then select "Delete Team".   The Office 365 Group name disappears from Outlook as expected.  But the SharePoint site called http://xxxx.xxxx.com/sites/{TeamSiteName} was not deleted, which I did not expect. I assumed the SharePoint site would have been deleted when I deleted the Team.

 

So, it sounds like there is agreement that this sounds like a bug.  I just wanted to make sure it was clear what I had done and had expected.

 


TeamDelete.png

So how do I open a ticket to Support?

 

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Have entered this in Team User Voice as a development suggestion. 

 

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/18972259-delete-an-o365-team

 

 

 

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Hello Betty,

Like the others said, the best way is to open a ticket to support. It seems a bug with the client UI. Often, when a bug is identified with a ticket, the fix get faster.

It's OK for me when you delete the office 365 group on the admin center UI. I never delete the site directly. It's not fast but it works.

Have a nice day

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

You made yourself perfectly clear to me :) ...you deleted the "Team" (Not Team Site) from the Teams UI and the associated SharePoint Modern Site didn't delete too. I was wondering if the AD Group and Exchange Mailbox and Calendar also deleted.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Hi @Betty Stolwyk - we were seeing this a few months back, but testing again today it is working for us, be it slow for the SPO Site and MBX to be removed, they do go within 30mins (as others have shared above).

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

@Clifford - I gave this another go with the most current Teams Client Web UI and all is well.  I created a new Team and verified that it built an associated SharePoint site,  an O365 Group (visible in Outlook from the Group drop-down and visible in Azure Active Directory Groups), and Exchange Group mailbox. (@Ellya - I forgot to check on the calendar).  

 

After verifying that all the expected objects had also been created, I proceeded to delete the Team through the Team client Web UI. (right-click Team name, and select Delete from drop-down menu)

 

 

A warning dialog box popped up:

Delete "xxxx" team

Are you sure you want to delete the team "xxxxx"? All channels, chats, files, and the Office 365 Group for this team will be deleted.

[checkbox] I understand that everything will be deleted.

                                                                                               buttons: [Cancel] [Delete Team]

 

I checked the checkbox and clicked "Delete Team" button.

Going back I verified that all associated objects had been deleted : SharePoint site,  the O365 Group (no longer visible in Outlook from the Group drop-down nor in Azure Active Directory Groups), and Exchange Group mailbox.

 

 

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

I also posted an update in the Microsoft Teams Uservoice to say that it looks like this has been fixed.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

That's great to hear! Thanks for sharing.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

To complete, it exists a delay for the deletion go up like Clifford said. I observe it too. I think this delay is due to the sync process between AAD and Teams.

Teams_sync_AAD.png

So, I think the delay max to see the deletion is over 15 mn.

 

 

Solution

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Further investigation shows for our E2 tenant, when you delete a Team via the Teams App, the O365 Group gets deleted, but the corresponding SharePoint site is given a LockState of "No Access", so even if you have permission to the site, it refuses to display in the browser. To see all these sites on your tenant, use the following PowerShell: 

get-SPOSite | Select URL, LockState | Where lockstate -eq 'NoAccess'

 

To unlock the site, so you can browse it again, use this:

set-SPOSite -identity <Site URL> -lockstate "unlock"

 

And if you want to then delete it:

Remove-SPOSite -identity <Site URL>

 

Hope that helps

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Thanks for your answer.

Indeed, with your powershell instruction, I see my team site is locked and not removed.

What a disappointment to always have to open  a support ticket. :-(

 

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Hello There. I know this is a technical post but as user i would like to know if someone knows any way to delete the team but keep the sharepoint site (so the opposite situation we are talking here) . this is usually related to the situation in which I completed a project and i don't want my people (and me neither) to see the team inside their list but, of course, i would like to keep all the documentation related to the project without having the need to copy it into another sharepoint location. Thank you very much.

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

@Ellya Gold - very nice instructions!  I had not previously worked with powershell so it took awhile for me to get back to this, I had a bit of a learning curve just to get started.

 

In case anyone else is just getting started with powershell with SharePoint online (O365), here are my beginner tips:

  • You have to first install SharePoint Online Management Shell (required to use powershell to interact with SP Online) https://www.microsoft.com/en-us/download/details.aspx?id=35588
  • You must be an O365 global administrator
  • You must open powershell on your PC as an administrator
  • Then you must connect to your SP site before executing any commands: 
     -    Connect-SPOService -Url https://domain.sharepoint.com

 

Sample commands:

Get-SPSite : output is a columnar table listing of all your SP sites.  Default columns are URL, owner and Storage Quota

Get-SPSite | Get-Member : output is a list of all the SP-Site properties. Reference these names in explicit Select statement.

Get-SPSite | Select field1, field2, etc : will display just those column values in columnar table format

Get-SPSite | Select field1, field2, etc | Format-Table -Autosize  :   will set column widths to longest value in that column.  Otherwise, the default column widths may truncated some values. 

Get-SPSite | Select field1, field2, etc. |  Where field2 -eq 'xxxxx' | Format-Table -Autosize  :  limit output based on Where criteria

Get-SPSite | Select field1, field2, etc. | Where field2 -eq 'xxxxx' | sort field1 | Format-Table -Autosize  :  sort by specified column

Get-SPSite | Select field1, field2, etc. | Where field2 -eq 'xxxxx' | sort field1 | Format-List  :  the output values are displayed in a vertical list instead of a table. Each line is field-title : field-value

 

Use Start-Transcript to copy all input/output during your powershell session to a file.

     Start-Transcript -Path c:\temp\ps.txt -Append

     ....

     Stop-Transcript

 

A couple of intro articles I found helpful:

http://www.itprotoday.com/management-mobility/powershell-objects-and-output 

https://www.petri.com/powershell-101-sharepoint-friends

 

Complete TechNet documentation:  https://docs.microsoft.com/en-us/powershell/scripting/powershell-scripting?view=powershell-6

 

 

Thanks again for putting me on a powershell adventure!

 

 

Re: Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site

Alessandro - I do not know how to do that directly, but could you do something like make the Team private and remove all the other members so that they do not see any references to it anywhere?  I think you will want to stay a member so that you can have access to the behind the scenes SharePoint team site.

 

There is also a  HiddenFromAddressListsEnabled parameter to the Set-UnifiedGroup powershell command that specifies whether the Office 365 Group appears in the global address list (GAL) and other address lists in your organization. Replace "Marketing Department" with your team name.  I've never done this but it looks like it would be relevant for you. 

 

Set-UnifiedGroup -Identity "Marketing Department" -HiddenFromAddressListsEnabled $true

 

 

There may be some other creative workarounds if what you want to do is not possible. Hopefully this could work for you or will give you other ideas to try.

Related Conversations