I’m trying to connect to Microsoft Dynamics 365 CRM via bubble’s API connector. I’ve successfully created an API to sign in with Microsoft. However, when using the same OAuth2 authentication I keep getting a 401 unauthorized error. I’ve been combing through the forms here and on Microsofts API documentation but I can’t figure it out.
Do you mean you initially tested the API using signin with social network in run mode and now you are trying to initialize API Call endpoint?
The warning say that it’ not tested (or expired). Bubble API Connector doesn’t keep your signin alive. You need to reauthenticate in runmode to be able to initialize call.
Also, not sure you have the correct endpoint to get user DATA. Better to have en email key path instead of name.
Yes, I got those settings in the screen shot to work with User Profile endpoint of “https://graph.microsoft.com/v1.0/me” to log the user in and get their information.
However when I swap the endpoint to the dynamics URL (in screenshot above) and try to run the login workflow or when trying to initialize a GET for the dynamics URL I get an error:
I’m trying to get the user’s data from Dynamics CRM to display it on a bubble io dashboard when they log in.
I can authenticate with the /me endpoint but when trying to call the dynamic endpoint I get this fun guy:
Even though my credentials are authorized for the dyanmics end point, I’m able to put the dynamics endpoint URL in my browser and see all the OData feed. However, I can’t call it from bubble.
access token probably not because this is from authorize process, but configuration of the APP in MS or with the scopes yes.
Can you share the whole settings in API Connector including API Call?
I don’t have enough time available to read MS dynmics auth documentation. There’s a lot of possible thing to consider like if you are using AD, on-premise… That may affect authentication process.
So I got it to work in Postman, but I’m having trouble transferring it over to bubble now. All I did in postman was setup the Oauth2 then ran the GET request on the dynamics URL and it worked.
However, I am not sure how to transfer over Postman settings to Bubble API as I’m not great with APIs.
Any chance you would be able to help translate? Again, I appreciate your help with this very much.
You seem to use an implicit grant type that is different from authorization code flow. You could try maybe to use token is returned as querystring (that is what implicit do while a code is returned in authorization code and you exchange this code for an access token. implicit will directly return implicit grant)
You should paste the same auth url, access token url, scopes and keys. user the /me endpoint and initialize theAPI. Once it’s done, add the same call to dynamics in API call and try to initialize.