API Connector - Passing variable to OAUTH2 flow


I am extending a Microsoft Graph integrated app and need to enable auth flow that will allow:

  1. the passing of a variable during the auth flow
  2. retrieval of the refresh token


  1. User has signed into app already using Microsoft sign in so we then store the users tenant_id in DATA. We then need the user to use a high level admin account to grant application level permissions via the following:

    // Line breaks are for legibility only.
    GET https://login.microsoftonline.com/{tenant_id}/adminconsent

  2. I need to be able to store the refresh token in KeyVault (Microsoft secure store) for requests in another platform but cannot seem to retrieve this from the Connector API.

Can anyone advise if the above two points are possible in bubble?

Many thanks.


You can’t.

What you need to do is perform this all yourself.

  1. do a redirect to the token URL
  2. Read in the redirect token (as well as auth token on page load

So don’t use the API connector.

Much appreciated. I’ll give those a try.

@NigelG Are you aware if there is an out the box solution to read in the body json for current page? I appear to only be able to locate the ability to read in parameters from the URL.

An excellent question…

The “new” microsoft OAUTH appears to break bubble as well if it comes back as JSON.