Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

When a user is deleted from Azure Active Directory, their Sways enter into a holding state where they will get deleted later. During that period of time, the Sway won't be accessible to regular users. IT administrators have 30 days after a user is permanently deleted from the Azure Active Directory to reassign Sways that they owned to another user within their tenant. 

Note: The Azure Active Directory also has a holding period before the user is permanently deleted.

Step 1: Download and install libraries

Important: PowerShell cmdlets were updated with security enhancements in December 2022. Ensure that you always use the latest libraries referred below. If you have an older version of the library already installed on your local machine, ensure that you delete the older libraries, associated folders, then restart your machine before proceeding with the following instructions. 

  1. Ensure that the user who is running the cmdlet is a Global Administrator.

  2. Download PowerShell 7 x64 here

    Important: When using the installation widget do not change any of the options.

  3. Download the latest libraries here.

  4. Extract the libraries:

    1. Microsoft.Identity.Client

    2. Microsoft.Office.Story.PowerShell.ChangeOwnerClient

    3. Microsoft.Office.Story.PowerShell.Protocol

    4. Newtonsoft.Json

  5. Keep the folder structure intact and install them as modules using, follow the instruction here.

    For example: 

    Copy and install modules to ...\Windows\system32\WindowsPowerShell\v1.0\Modules\

  6. Ensure that the downloaded .dll files are not blocked by unblocking them via their properties settings.


Important: Make sure downloaded files are unblocked by selecting Unblock in the Properties settings.

Step 2: Import the Modules in PowerShell

  1. Open PowerShell 7 (x64) as an administrator:

    The Windows PowerShell window will pop open. The prompt C:\Windows\system32 means you've opened it as an administrator.


2. Import the modules that were previously downloaded.


Import-Module Microsoft.Identity.Client
Import-Module Newtonsoft.Json
Import-Module Microsoft.Office.Story.PowerShell.Protocol
Import-Module Microsoft.Office.Story.PowerShell.ChangeOwnerClient

(Additional instructions on how to import modules)

Step 3 - Connect to the Sway Service and run the transfer script

Note:  Sways can only be transferred from the owner to another user within the same tenant. Only the tenant administrator may initiate a transfer. 

  1. Connect to the Sway Service via PowerShell

  2. Enter the credentials of the tenant administrator





Transfer a single Sway to another account

To transfer a single Sway that was previously owned by a deleted account to another account within the same tenant, you will need the following information:

  • Sway Lookup ID - ID found after the URL for any given Sway (e.g. "Ex: abc123 for")

  • New Email Address - email address of the account you are transferring the Sway to


	Start-ChangeSwayOwner -OriginalSwayLookupId <Sway Lookup ID> -DestinationOwner <New Email Address>


	Start-ChangeSwayOwner -OriginalSwayLookupId abc123 -DestinationOwner

Note: Do not use the entire URL of the Sway as the Lookup ID. In the above example, "abc123" is the Lookup ID and NOT ""

Bulk transfer all Sways from one account to another

To transfer all Sways previously owned by a deleted account to another account within the same tenant, you will need the following information:

  • Deleted Account Email Address - email address of the account that was deleted from the Azure Active Directory

  • New Account Email Address - email address of the account you are transferring the Sway to


	Start-BulkChangeSwayOwner <Deleted Account Email Address> <New Account Email Address>



Step 4 - Verify that the Sways were reassigned

  1. Go to a Sway that was reassigned.

  2. Notify the user who the Sways were transferred to and ask them to verify that they now own the Sways.

Things to Know

  • You have up to 30 days of the account being permanently deleted from the Azure Active Directory to reassign any Sways that were owned by that account

  • After successfully running the reassignment script, it could take up to 1 hour for the reassigned Sways to appear in the new account.

  • Some settings associated with the reassigned Sway won't be preserved. This includes:

    • Sway Analytics

    • Share settings

      • If a Sway was shared with specific people, it will be reset back to the default settings in the reassigned Sway

      • For Sways that were shared for editing, the new owner will need to re-share a new link to any coauthors who still need edit access

    • Last edited date

    • Settings previously set on the Sway. For example: removal of the Sway banner and Autoplay.

    • When videos are uploaded they're copied asynchronously and may be subject to data loss if the transfer is performed very close to the 30-day limit.

    • The library was designed to run on PowerShell 5.1. If you're running a newer version, you need to import the modules in compatibility mode. Follow the instructions in the following topic: Windows PowerShell Compatibility.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!