<t>I applaud the effort at putting this together, but I feel like just using the Microsoft.Graph module for this stuff is way easier and, more importantly, supportable moving forward.<br/>
<br/>
If you wanted to write the API queries yourself instead of using the prebuilt cmds you could always Invoke-MGGraphRequest instead of IWR, needing to grab tokens, etc.</t>