No access Token OAuth2

Hi everyone,

I’m trying to connect my Bubble app to Microsoft Dynamics 365 Business Central API using Azure OAuth2 authentication via the Bubble API Connector plugin.

What I’ve done so far:

  • Registered my app in Azure AD and set up OAuth2 with the following:
    • Authorization URL: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize
    • Token URL: https://login.microsoftonline.com/organizations/oauth2/v2.0/token
    • Redirect URI configured both in Azure and Bubble to https://wyshbonesales.com/api/1.1/oauth_redirect (plus some variants for debug/live branches)
    • API Permissions granted (including Financials.ReadWrite.All, offline_access, and User.Read), with admin consent granted.
  • Configured Bubble API Connector for OAuth2 User-Agent flow:
    • App ID and Secret from Azure
    • Scope matches Azure scopes
    • Token name set as access_token
    • “Token is returned as querystring” unchecked
    • “Use generic redirect URL” unchecked to allow manual redirect URIs for different app versions
  • Created Bubble workflow with “Signup/login with API - Business Central API” action to perform OAuth handshake

The problem I’m facing:

  • The OAuth handshake completes successfully, and the token is returned by Azure (confirmed via raw response in Bubble debugger).
  • However, subsequent API calls in Bubble fail with the error:
    "missing access_token" or "InvalidAuthenticationToken: Access token is empty"
  • It seems Bubble is not properly picking up or using the access token returned from the OAuth handshake.
  • I have checked the token name, endpoints, scopes, and permissions multiple times.
  • Tried saving the token explicitly to a user field or custom state, but API calls still fail.
  • I’m not sure if I need to configure anything else in the API Connector or Bubble workflows to make Bubble pass the token in the Authorization header properly.

What I’m looking for:

  • Advice or examples of working OAuth2 setup in Bubble API Connector with Azure AD and Business Central.
  • How to ensure Bubble correctly captures and uses the access token for authenticated API calls.
  • Confirmation on correct API Connector settings, workflow setup, and any necessary token saving steps.
  • Any known quirks or troubleshooting tips for Azure OAuth2 + Bubble integration.

Thanks in advance for any help!




There’s already a lot of topic on how to configure MS graph oauth2 authorization code… did you take time to search and check how this is configured?
Be sure to also request all needed scopes…

(and there’s probably more…)

I have and I have left a message in that thread now too.

thanks

1 Like