How Do I Inventory Videos in Stream Classic?

Matt Dressel
April 27, 2023

Microsoft has officially announced the decommissioning date for Stream Classic (Feb 15, 2024). One of the first steps you should take to prepare for this decommissioning is to audit the content you have in Stream Classic. To do this, Microsoft has created a script that will produce a CSV file with information about all videos on Stream Classic.

NOTE: This does not apply to GCC customers. Microsoft is working to get their migration tool certified as compliant in GCC environments. Once this happens, they will announce a timeline that is specific to GCC. This timeline will be similar to what they have for commercial.

Running the script

The script isn’t really an integrated part of Stream Classic. Instead, it’s a file you can download and run using PowerShell.  

Downloading the Script

To get the script you need to go to admin settings within Stream Classic.

Then navigate to Stream Migration -> Reports.

Then you can click Download Script to get the script onto your machine.

Get a Valid Authorization Token

Unfortunately, you can’t just run the script. This is because the script utilizes a number of internal endpoints that do not support getting an authorization token automatically. Instead, you have to do some manual steps in your browser using your browsers developer tools to get a valid authorization token.

The first step to doing this is to open your browsers developer tools using F12. Note that you may see your Developer Tools open in a few different ways. The default is to open docked to the left side of your browser window.

Now that you have Developer Tools open you need to navigate to the Stream Classic home page.

Select the Network tab in your Developer Tools pane.

Then filter by refreshtoken. If you don’t have any results, hard refresh your page.

Select the request that has GET listed under general.

Under Request Headers you will see the authorization header.

You will need to copy all of the text after the word Bearer. This text will be very long so make sure you get all of it and don’t include any spaces before or after this text. You should be able to right click on the header and select Copy Value. From there you just have to remove the Bearer that is at the front of the value.

Now you need to create a new file that will be used by the script. For example: c:\Users\<alias>\Documents\StreamReportGenerator\token.txt.

Free Assessment

Is Team Communication Holding You Back? Find Out in Just 2 Minutes.

Take our quick scorecard to uncover communication gaps and hidden barriers within your team.

Free ASSESSMENT

Is Team Communication Holding You Back?

Find Out in Just 2 Minutes.

Take our quick scorecard to uncover communication gaps and hidden barriers within your team.

Run the script

You might think you are ready to run the script, but not quite. You still need to get your AAD Tenant ID. To do this, you can go to you Active Directory Admin Center

Now you are ready to run the script and get the data out of Stream. Open a PowerShell window and go to the folder where you have the script and the token file.

Now you can run the script and it will populate a few different files and folders in the -OutDir.

The CSV file you are interested in will be located in the folder `./StreamClassicVideoReport/<Date Time Stamp>/`.

Notes

  • If your script fails to run, the script will save some “state” data that could mess up future runs. The best way to fix this is to delete the folders and files that were created when the script was run initially.
  • Your token is only valid for 1 hour. If it takes you longer than 1 hour to run your script or if you have a large number of videos you will need to update your token and run the script again. The script will automatically resume from where it left off.
  • There are additional options for this script. To see these details please check out the official documentation: https://learn.microsoft.com/en-us/stream/streamnew/migration-details#stream-classic-usage-report  
  • If you run the script again after your first successful run, the tool will only get videos that are new.

Doing Something Useful with the CSV

Now we have a CSV, so what do we do with it?  

If you are familiar with Excel and just want to review manually you can work with the CSV directly. Details about the field names can be found here.  

If you want a more visual representation of the data, Microsoft also provides a PowerBI template (find it here) that can be used to analyze the CSV directly. In order to do this you need to have PowerBI Desktop.

When you open the template, it will ask you for the path to where the CSV files are.

When you click load, the report will be populated and the report will display.

Now you can publish the report to a Power BI workspace and share the report with other users.

Resources

Whenever you're ready, there are 3 ways we can help you:
  1. Total Communication Reset: Our Total Communication Reset will improve team communication and boost productivity in just 20 days.
  2. Join Our Membership Community: Join leaders and tech innovators on a journey to transform their workplace.
  3. Project-Based Services: Engage a dedicated team on a project basis to drive impactful outcomes and achieve your business goals.

Have Questions About This?

Leave a comment below!
Bring them to our next Online Office Hours
No items found.