EvotecIT / O365Essentials

A module that helps to manage some tasks on Office 365/Azure via undocumented API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When using PowerShell 5.1 module returns error about cookies over 4096 bytes

PrzemyslawKlys opened this issue · comments

There are some issues with cookies and when the cookie gets too big (over 4096 bytes) things fail. In my case, I noticed that when I had a shorter password it worked great. There needs to be a way to somehow force Invoke-RestMethod to accept bigger cookies.

Probably with something like that, but I have no knowledge on how to pass it properly (probably thru websession parameter)

$CookieContainer = [System.Net.CookieContainer]::new()
$CookieContainer.MaxCookieSize = 8096