Forge Providers (OAuth 2.0) scope problem with MS graph & MS Dynamics that profile is required

Hello dev community :grinning:,

we are implementing a forge oauth2 provider against MS Dynamics CRM.

Sofar for it is possible to connect the forge provider with etc. and get the profile info :handshake:.

BUT we need a scope to access the CRM and with this scope it’s not possible to obtain the profile from or are we missing something here :upside_down_face:?

Any hint would be great to point us in the right direction before we say, it’s not possible to do.
We can only get one scope (-> audience) but need two, so it’s not possible.

Thank you everybody and have a nice day out there :pray:


1 Like

Hi @BenjaminCJohn

I’ve worked with the Microsoft Graph in the past and remember having to build an OAuth authorize URL like this:

Note that with the MS Graph, you can just add the correct scope when you build the authorize URL.

So, back to MS Dynamics CRM…

From reading this:

I can see that the authorize URLis:

And the scope used in the example is This will likely be different for every tenant (of Forge and MS Dynamics CRM).

I hope this helps.



Hi @david,
thank you for this detailed explanations.

All what you write is correct, but it does not help to solve the issue that I need to get a token thats let me access the graph api to get the user profile and then use this token to access MS Dynamics CRM. It looks like this is what the forge provider module does. I can either access MS Dynamics CRM OR MS Graph, but for the forge provider I need the Graph scope to get the profile and therefore can then not access the Dynamics CRM with that scope.

This is my problem, if this is doable with forge provider, maybe it is not.

Thank you in advance,

@BenjaminCJohn yeah, sorry no help with Forge, but hopefully a little with MS Graph.

My guess is that you’ll need to roll your own auth and save to forge storage. You may even need Connect on Forge so that you can ensure ownership of the host for the redirect url :grimacing:

1 Like