Using URL parameter in Oauth2 Custom token endpoint

Hello!

I’m trying to do a plugin for Dataverse. In dataverse, when using custom token method, the token url is in this format:
https://login.microsoftonline.com/ tenant id /oauth2/v2.0/authorize

Ie:

I want to use a url parameter for the token endpoint, but it doesn’t seem to be possible? Or is it? I tried with <> and {}.
How could I implement this?

There’s no dynamic option actually for this type of Auth
However, Custom oAuth (client_credentials) is for server-to-server so normally, you shouldn’t have to modify this dynamically because this should call your own account.
If you want to call user account using this way (but normally, you should user authorization_code flow with user-agent) you could set none-selfhandled for auth and use API Call to get the token that you will pass to other call with Authorization header manually (instead of Bubble doing it for you with the auth section)

Thanks Jici!

Yeah im only trying to do this dynamically because it’s for a plugin, so plugin users would input the tenant id for their dataverse.

Yeah, i had initially done it with an api call to get the token, I just found yesterday I could get the custom token auth to work (using form data instead of json). and since it feels like better user experience than asking the plugin users to create a workflow in the application to store the token and then input this token in each call they do to the api, i wanted to go with this option.

Yes. Ive suggested on ideaboard to add dynamic parameter in auth for API connector and.give an example for oauth2 user agent. They implemented it only for user-agent. I suggested to @grace.hong a few months ago to complete this features as she was asking me about some use case for other auth type.

1 Like