HOWTO: Retrieve User Photo from Microsoft Graph

To all,

I’m paying this back to the forum since you all have been a wealth of information. Also, I saw some older posts related to this with no resolution.

This assumes you’ve also set up an app in Azure per the video from CNCA.com VIP - Microsoft Azure (vimeo.com)

Also, you will have configured the Bubble API plugin to use the information from above to create your API connection as shown in the photo below. Thanks to the video above, this was actually the easiest part of the setup.

You then create a call within the API created above. Ensure you have Data Type as Image and Capture Response Headers checked or this won’t work. It should look like this:

When you initialize the call, you will see the following prompt. Ensure you change the return type for Body from Text to Image.

Now that you are done with set up, I have a workflow that updates the User Name and User Photo when they log in. That way, if they change in the Microsoft system, it stays in sync. The call to update the User Photo is shown below where you have to navigate to the Body value you set earlier to image.

I hope this helps someone. Neither Bubble’s nor Microsoft’s documentation makes this clear as there’s some assumed knowledge that I didn’t possess initially.

Happy Bubbling!!

1 Like