blog.icewolf.ch

Let's talk about IT!
posts - 2247, comments - 295, trackbacks - 0

My Links

Archives

Post Categories

icewolf

Reassign Sway from a permanently deleted User

Hi All,

There is an update of the PowerShell to reassign from deleted Users.

Requirements:
  • You need to be Global Administrator
  • You need the ID of the Sway to Transfer
  • max 30 Days after the user has permanently deleted from Azure Active Directory
Reassign Sways from a deleted user account - Admin Help



PowerShell Cmdlet for Reassigning Sways


After you have downloadet the Zip you need to extract it. It contains four folders with DLL's


Each DLL must be unblocked first


Now you can import those Folders

Import-Module C:\temp\SwayRecovery\SwayRecovery\Microsoft.Identity.Client
Import-Module C:\temp\SwayRecovery\SwayRecovery\Newtonsoft.Json
Import-Module C:\temp\SwayRecovery\SwayRecovery\microsoft.office.story.powershell.protocol
Import-Module C:\temp\SwayRecovery\SwayRecovery\microsoft.office.story.powershell.changeownerclient



List the Commands

Get-Command -ModuleĀ  microsoft.office.story.powershell.changeownerclient


Login to Sway

Connect-SwayService


I've created a Sway and then deleted that User. See the ID of the Sway


Now i am transfering the Sway to a new owner

Connect-SwayService
Start-ChangeSwayOwner -OriginalSwayLookupId i0q2L2nuAip57pF5 -DestinationOwner "a.bohren@icewolf.ch"
Disconnect-SwayService




The Sway is now visible in my Sways



In my Opinion it's a little bit a fuzzy Process. First of all: Why is that not a regular PowerShell Module and needs extraction and unblocking the DLL's?
Why does it need Global Admin Role? Would not something less also be appropriate?

Regards
Andres Bohren


Print | posted on Sunday, January 15, 2023 11:03 AM | Filed Under [ Microsoft365 ]

Powered by:
Powered By Subtext Powered By ASP.NET