Forum Academy Marketplace Showcase Pricing Features

Is it possible to integrate with Microsoft’s Graph API?

Has anyone figured out how to finalize a Microsoft Graph API? I’ve seen forum posts where Bubble’s requirement that people use the debug_mode is causing problems as Microsoft doesn’t allow parameters but can’t seem to fix it.

I’m struggling to figure this out as I keep getting an error about the redirect URL. Really needing this for my app.

Do you mean you have problem with oAuth2 with MS Graph?

@Jici , thanks for replying. That’s correct. My call is set up exactly as is needed, but when I try to run in debug_mode via a button workflow, Microsoft gives a “ Reply URL specified in the request does not match the reply URLs configured for the application.”

I’ve seen other Bubblers run into the same issue as Microsoft is, presumably, expecting the URL to not have Bubble’s default debug parameter. Very frustrating and can’t figure out a fix.

Can you share your setting? I can confirm it’s doable because I’ve done this a lot of time in the past.
Share settings in your App in MS and also in API Connector
(A good idea, is to use the generic URL)

@Jici, I figured it had to be. Thanks for taking a look. Here is the API (set to be an oAuth2 user agent flow):

In Microsoft, I’ve registered an app in the Azure Portal and set the redirect URI to be https://myappname.bubbleapps.io/version-test/test, which is the page I’m using to initiate the API.

When I run it, though, Microsoft then gives that “Reply URL specified in the request does not match the reply URLs configured for the application” error.

What’s so strange to me is it authenticates just fine when I run it without the debug_mode parameter that Bubble requires and returns a session ID; Bubble just shows an error alert before it authenticates.

image

This is why I suggest you to use the “Use a generic redirect URL” checkbox and set this generic url into MS Azure. It will work better.
When you use API Connector, it will submit the redirect url with the current page url if the generic is not selected. Most of API will accept that and just remove the parameters from the URL. But a lot of API need an exact match between what you enter in the redirect url in the auth request and what you set in their settings.

You don’t see the auth request settings, but basically, this contain the scope, the redirect url (actually, with your setting, it will use the current page url), the app id and the auth type.

If you wan’t to avoid any error, use the generic redirect url instead

1 Like

@Jici, very interesting! To confirm, I just use the generic URL Bubble displays in my API page?

Exactly. And don’t forget to set it in MS.
This is the easiest fix you can have for this issue. And you will not need to care about adding more url in MS if you use the API in other page or live vs Dev. It will work everywhere.

@Jici, brilliant! Thanks for the info. That worked on the Microsoft side, but when I get into Bubble it’s now saying the following:

image

I thought maybe this meant it had worked previously, but Bubble is also still showing the message about my call not having been tested yet. :frowning:

Any ideas?

Go in your User DB and delete any user with the email of the MS account. Retry.

@eLPDev Did you make it work?