Repository: yt-dlp
Issue: [SharePoint] Video downloaded is actually an HTML file (access denied)
Labels: incomplete,site-bug,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

France

### Provide a description that is worded well enough to be understood

I am trying to download a video that was shared with me on SharePoint. Unfortunately, the downloaded video is not a video, but rather an HTML document "access denied"

I can give the URL, but unfortunately, it's a private video with a required login.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', "https://temtsp-my.sharepoint.com/personal/xxxxxxxxxxx/_layouts/15/stream.aspx?id=%2Fpersonal%2Fxxxxxxxxxxx%2FDocuments%2FEnregistrements%2FRéunion d'Information des Maîtres d'apprentissage-20241016_142513-Enregistrement de la réunion.mp4&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D&referrer=StreamWebApp.Web&referrerScenario=AddressBarCopied.view.7b0e8398-6bce-4863-a523-66d35fc3ebbb", '--cookies', '/Users/arthur/Downloads/cookies.txt', '--user-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.10.22 from yt-dlp/yt-dlp [67adeb7ba] (pip)
[debug] Python 3.12.5 (CPython arm64 64bit) - macOS-14.7-arm64-arm-64bit (OpenSSL 3.3.2 3 Sep 2024)
[debug] exe versions: ffmpeg 7.1 (setts), ffprobe 7.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.08.30, mutagen-1.47.0, requests-2.32.3, sqlite3-3.43.2, urllib3-2.2.2, websockets-13.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1839 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.10.22 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.10.22 from yt-dlp/yt-dlp)
[SharePoint] Extracting URL: https://temtsp-my.sharepoint.com/personal/xxxxxxxxxxx/_layouts/15/stream.aspx?id=%2Fpersonal%2Fxxxxxxxxxxx%2FDocuments%2FEnregistrements%2FRéunion d'Information des Maîtres d'apprentissage-20241016_142513-Enregistrement de la réunion.mp4&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D&referrer=StreamWebApp.Web&referrerScenario=AddressBarCopied.view.7b0e8398-6bce-4863-a523-66d35fc3ebbb
[SharePoint] /personal/xxxxxxxxxxx/Documents/Enregistrements/Réunion d'Information des Maîtres d'apprentissage-20241016_142513-Enregistrement de la réunion.mp4: Downloading webpage
[SharePoint] 01S7Q3B7XLKIJCSSMR2ZF2X2MIRMVM67WJ: Downloading MPD manifest
[SharePoint] 01S7Q3B7XLKIJCSSMR2ZF2X2MIRMVM67WJ: Downloading m3u8 information
[SharePoint] 01S7Q3B7XLKIJCSSMR2ZF2X2MIRMVM67WJ: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 01S7Q3B7XLKIJCSSMR2ZF2X2MIRMVM67WJ: Downloading 1 format(s): source
[debug] Invoking http downloader on "https://temtsp-my.sharepoint.com/personal/xxxxxxxxxxx/_layouts/15/download.aspx?UniqueId=291252eb-9149-4bd6-abe9-888b2acf7ec9&Translate=false&tempauth=v1.eyJzaXRlaWQiOiJhODU4MWNjNy1iZmY3LTRmN2ItOGY0ZC04NGJmNGFhMDE3OWEiLCJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvdGVtdHNwLW15LnNoYXJlcG9pbnQuY29tQDJiMWJlMjE1LTVjZjEtNDNkZS04YmM3LTk0NmJkZjU3ZjljZCIsImV4cCI6IjE3Mjk2MDg3NTkifQ.CgoKBHNuaWQSAjQzEgsI6vqgt9qquT0QBRoPMTU3LjE1OS4xMzcuMTEzIhRtaWNyb3NvZnQuc2hhcmVwb2ludCosWVg4cnFBc2lyMWU1MThXNkhWNFRZVVlxVFEwNlYzalJuUVU1bnVRVGMrYz0wpQE4AUIQoVxq0icwAKA9HnGL6ASjWEoQaGFzaGVkcHJvb2Z0b2tlblIIWyJrbXNpIl1iBHRydWVqJDI4NTQzNTRhLTM1N2EtNGYwYi04MjY5LTU1ZDJjNzcyOTg2NXIpMGguZnxtZW1iZXJzaGlwfDEwMDMyMDAwZmQ2OGVhY2JAbGl2ZS5jb216ATDCATEwIy5mfG1lbWJlcnNoaXB8YXJ0aHVyLmpvdmFydEB0ZWxlY29tLXN1ZHBhcmlzLmV1yAEB.rN_6Z_KRbAPSR_sgyAglUf3bjB0Y5CZUWutIW_Ci0CI"
[download] Destination: Réunion d'Information des Maîtres d'apprentissage [01S7Q3B7XLKIJCSSMR2ZF2X2MIRMVM67WJ].mp4
[download] 100% of  258.32KiB in 00:00:00 at 666.03KiB/s
```