
UPDATE: This is now available as a module
https://www.powershellgallery.com/packages/Office365TokenGet
One of the things that I had difficulty with when I was starting to work with MS Graph API was how to get authenticated. So here is a post that hopefully would help others...