Forum Discussion
Getting (401) Unauthorized error launching the video report script
Hello,
I´m trying to launch the StreamClassicVideoReportGenerator script to get the information of Stream before migrating all the videos but I´m getting this error:
2/9/2024 5:22:26 PM ------START------
Script version: 1.13
2/9/2024 5:22:26 PM TenantPatch URI: https://api.microsoftstream.com/api/tenants/a1b7909b-6594-4f7e-986c-162b2a1acd77?api-version=1.4-private
2/9/2024 5:22:27 PM
2/9/2024 5:22:27 PM System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
I have tried to add these after the parameters:
Connect-PnPOnline -Url https://befesa.sharepoint.com/sites/stream -UseWebLogin
To try to connect before because I don´t know if it´s necessary but it doesn´t work.
Could anybody help me, please?
Thanks.
3 Replies
- louroman79Copper Contributor
nanoterremotoI'm having the same problem. Were you able to find a fix?
- alecia2022Copper Contributor
nanoterremoto I have the same error. After regenerate token and update the file, rerun the script. Work perfectly.
- nanoterremotoCopper Contributor
Hello alecia2022
First of all thanks for your reply.
I have tried to regenerate the token several times, update the file with every new token and rerun the script with every new token and still the same error 401.