How to get video list using powershell?

%3CLINGO-SUB%20id%3D%22lingo-sub-1671540%22%20slang%3D%22en-US%22%3EHow%20to%20get%20video%20list%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1671540%22%20slang%3D%22en-US%22%3E%3CP%3E%3CBR%20%2F%3EGreetings%2C%3C%2FP%3E%3CP%3EI'd%20like%20to%20get%20a%20list%20of%20videos%20uploaded%20to%20Microsoft%20Stream.%3C%2FP%3E%3CP%3EI%20referred%20to%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-stream-forum%2Fpowershell-script-to-audit-and-export-channel-content-details-of%2Fm-p%2F354832%22%20target%3D%22_self%22%3Ethis%20document%3C%2FA%3E%26nbsp%3B%20.%20I'm%20testing%20it%20by%20copying%20and%20pasting%20it.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%5Bstring%5D%24StreamPortal%20%3D%20%22https%3A%2F%2Fweb.microsoftstream.com%2F%3FNoSignUpCheck%3D1%22%20%0A%5Bstring%5D%24StreamPortalChannelRoot%20%3D%20%22https%3A%2F%2Fweb.microsoftstream.com%2Fchannel%2F%22%0A%5Bstring%5D%24StreamAPIChannels100%20%3D%20%22https%3A%2F%2Faase-1.api.microsoftstream.com%2Fapi%2Fchannels%3FNoSignUpCheck%3D1%26amp%3B%60%24top%3D100%26amp%3B%60%24orderby%3Dmetrics%252Fvideos%2520desc%26amp%3B%60%24expand%3Dcreator%2Cgroup%26amp%3Bapi-version%3D1.3-private%26amp%3B%60%24skip%3D%22%0A%0A%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EPart%20of%20code%2C%20These%20don't%20seem%20to%20work.%3C%2FP%3E%3CP%3EThe%20first%20line%20code%20URL%20works.%3C%2FP%3E%3CP%3EThe%20code%20on%20the%20second%20row%20didn't%20work%2C%20so%20I%20changed%20it%20like%20this.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fweb.microsoftstream.com%2Fchannel%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fweb.microsoftstream.com%2Fchannel%2F%3C%2FA%3E%20-%26gt%3B%20%3CA%20href%3D%22https%3A%2F%2Fweb.microsoftstream.com%2Fbrowse%3Fview%3Dchannel%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fweb.microsoftstream.com%2Fbrowse%3Fview%3Dchannel%3C%2FA%3E%3C%2FP%3E%3CP%3EIs%20this%20right%3F%3C%2FP%3E%3CP%3EAnd%20I%20think%20the%20URL%20on%20the%20third%20line%20doesn't%20work.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%24StreamAPIChannels100%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E-%20There%20is%20no%20value%20in%20this%20variable.%20There%20is%20also%20a%20Microsoft%20Stream%20channel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EEurope%3A%20https%3A%2F%2Feuno-1.api.microsoftstream.com%0AAsia%3A%20https%3A%2F%2Faase-1.api.microsoftstream.com%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BNeither%20seems%20to%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20not%20much%20information%20about%20this.%20I'd%20really%20appreciate%20your%20help.%3C%2FP%3E%3CP%3ETell%20me%20if%20what%20I%20think%20is%20wrong.%20Thanks..%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1677493%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20video%20list%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1677493%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774032%22%20target%3D%22_blank%22%3E%40BoHyun%3C%2FA%3E%26nbsp%3BAs%20I%20posted%20it%20here%20to%20your%20other%20post%20(%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-stream-forum%2Fmicrosoft-stream-cors-error%2Fm-p%2F1673381%2Fhighlight%2Ffalse%23M6025%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-stream-forum%2Fmicrosoft-stream-cors-error%2Fm-p%2F1673381%2Fhighlight%2Ffalse%23M6025%3C%2FA%3E)%20-%20currently%20we%20do%20not%20have%20an%20official%20API%20for%20Microsoft%20Stream.%20I%20have%20managed%20to%20get%20the%20videos%20with%20a%20Power%20Automate%20Flow%20%22Send%20HTTP%20request%22%20which%20worked%2C%20but%20is%20more%20a%20hack%20than%20supported.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1682308%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20video%20list%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1682308%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774032%22%20target%3D%22_blank%22%3E%40BoHyun%3C%2FA%3E%26nbsp%3BDid%20you%20see%20this%20in%20the%20Stream%20docs%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fstream%2Faudit-logs%23use-powershell-to-search-the-log%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fstream%2Faudit-logs%23use-powershell-to-search-the-log%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%20this%20blog%20posts%20from%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F64%22%20target%3D%22_blank%22%3E%40Tony%20Redmond%3C%2FA%3E%26nbsp%3B%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Foffice365itpros.com%2F2020%2F05%2F29%2Ftracking-video-uploads-stream%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foffice365itpros.com%2F2020%2F05%2F29%2Ftracking-video-uploads-stream%2F%3C%2FA%3E%26nbsp%3Band%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Foffice365itpros.com%2F2020%2F06%2F11%2Freport-stream-deleted-videos%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foffice365itpros.com%2F2020%2F06%2F11%2Freport-stream-deleted-videos%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1681563%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20video%20list%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1681563%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F15303%22%20target%3D%22_blank%22%3E%40Tomislav%20Karafilov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%20for%20your%20answer.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIn%20my%20case%2C%20it%20would%20be%20a%20little%20difficult%20to%20use%20Power%20Automatic%20Flow.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20just%20need%20video%20list%20information%2C%20not%20data%20processing.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20also%20tried%20how%20to%20get%20by%20using%20microsoft%20audit%20logs..%26nbsp%3BBut%20I%20failed.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20any%20other%20way%20but%20to%20wait%20for%20API%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor


Greetings,

I'd like to get a list of videos uploaded to Microsoft Stream.

I referred to this document  . I'm testing it by copying and pasting it.

[string]$StreamPortal = "https://web.microsoftstream.com/?NoSignUpCheck=1" 
[string]$StreamPortalChannelRoot = "https://web.microsoftstream.com/channel/"
[string]$StreamAPIChannels100 = "https://aase-1.api.microsoftstream.com/api/channels?NoSignUpCheck=1&`$top=100&`$orderby=metrics%2Fvideos%20desc&`$expand=creator,group&api-version=1.3-private&`$skip="

 

 


Part of code, These don't seem to work.

The first line code URL works.

The code on the second row didn't work, so I changed it like this.

https://web.microsoftstream.com/channel/ -> https://web.microsoftstream.com/browse?view=channel

Is this right?

And I think the URL on the third line doesn't work.

$StreamAPIChannels100

- There is no value in this variable. There is also a Microsoft Stream channel.

 

Europe: https://euno-1.api.microsoftstream.com
Asia: https://aase-1.api.microsoftstream.com

 Neither seems to work.

 

There is not much information about this. I'd really appreciate your help.

Tell me if what I think is wrong. Thanks..

3 Replies

@BoHyun As I posted it here to your other post (https://techcommunity.microsoft.com/t5/microsoft-stream-forum/microsoft-stream-cors-error/m-p/167338...) - currently we do not have an official API for Microsoft Stream. I have managed to get the videos with a Power Automate Flow "Send HTTP request" which worked, but is more a hack than supported.

@Tomislav Karafilov 

 

Thank you for your answer. 

In my case, it would be a little difficult to use Power Automatic Flow.

I just need video list information, not data processing.

I also tried how to get by using microsoft audit logs.. But I failed.

Is there any other way but to wait for API?