This is part 2 of my Graph Basic's series and this post is born out of an actual need that I had over the last week which was to get a user photo from the Microsoft Graph and save it as a custom size and different image type. Like many things there are multiple ways of doing this but the Microsoft Graph GetPhoto endpoint is pretty straight forward and delivers the image in one of the following formats 48x48, 64x64, 96x96, 120x120, 240x240, 360x360, 432x432, 504x504, and 648x648. Because I wanted to use the photo on a Elgato stream deck this required the size be 72x72 so I needed some extra code to do the resize of the photo and change the format from a jpeg to png. Getting the user-photo from the Microsoft Graph Before you can get the user's photo from Microsoft Graph you need to make sure the application registration you are using has one of the following permissions User.Read, User.ReadBasic.All, User.Read.All, User.ReadWrite, User.ReadWrite.All Then after you have obtain
Pushing the Envelope in Messaging and Office 365 Development