Repository: yt-dlp
Issue: microsoftstream.com doesn't work with `--cookies-from-browser` (session cookies)
Labels: account-needed,site-bug

### 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

Poland

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

- Even though I passed `--cookies-from-browser firefox` and my user agent. yt-dlp tells me that "This video is only available for registered users".
- seems like `--cookies-from-browser` does not load all cookies (1576 out of 2252)
- Specifying the profile doesn't help
- I am logged in my browser.
- I was able to get it working by exporting my cookies to a .txt file in netscape format, and then running it with `--cookies` parameter
[output-cookies.txt](https://github.com/yt-dlp/yt-dlp/files/14876862/output-cookies.txt)


### 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: ['--user-agent', 'Mozilla/5.0 (Windows NT 10.0; rv:124.0) Gecko/20100101 Firefox/124.0', '--cookies-from-browser', 'firefox', 'https://web.microsoftstream.com/video/09925766-19e6-4eee-aa02-482b2b99cd03', '-o', '%(video_autonumber)s.%(ext)s', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2024.04.04.165246 from yt-dlp/yt-dlp-master-builds [9073ae645] (zip)
[debug] Python 3.11.8 (CPython x86_64 64bit) - Linux-6.8.2-arch2-1-x86_64-with-glibc2.39 (OpenSSL 3.2.1 30 Jan 2024, glibc 2.39)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.12.0, certifi-2024.02.02, requests-2.31.0, sqlite3-3.45.2, urllib3-1.26.18
[debug] Proxy map: {}
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/lukasz/.mozilla/firefox/qmzj5g0y.default-release/cookies.sqlite"
Extracted 1566 cookies from firefox
[debug] Request Handlers: urllib, requests
[debug] Loaded 1809 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.04.04.165246 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.04.04.165246 from yt-dlp/yt-dlp-master-builds)
[microsoftstream] Extracting URL: https://web.microsoftstream.com/video/09925766-19e6-4eee-aa02-482b2b99cd03
[microsoftstream] 09925766-19e6-4eee-aa02-482b2b99cd03: Downloading webpage
ERROR: [microsoftstream] 09925766-19e6-4eee-aa02-482b2b99cd03: This video is only available for registered users. Use --cookies-from-browser or --cookies for the authentication. See  https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp  for how to manually pass cookies
  File "/home/lukasz/tois-vid/./yt-dlp/yt_dlp/extractor/common.py", line 734, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukasz/tois-vid/./yt-dlp/yt_dlp/extractor/microsoftstream.py", line 58, in _real_extract
    self.raise_login_required(method='cookies')
  File "/home/lukasz/tois-vid/./yt-dlp/yt_dlp/extractor/common.py", line 1233, in raise_login_required
    raise ExtractorError(msg, expected=True)
```