OAuth Microsoft SSO with Bubble.io

HI @johnny just stumbled upon this thread and its been a life saver!! I just have a question, how do you access the rest of the user profile data?

Authenticating gets the id and email (userPrincipalName) but where is the rest of the data returned?

1 Like

You’d need to specify the scopes for the data you want to get. For me, email was enough

Thanks @johnny I’ve set the following scopes: openid offline_access email profile User.Read.All IdentityProvider.Read.All

The thing is, in order to access the rest of the data, should I build a new API to call for this data? When accessing the OAuth API data, I can only see what was set as id and email.

image

There’s a Plugin called Microsoft 365 that achieves this in some way, but can’t use this b/c it requests for a lot more information that we would need (customer doesn’t want this).

@johnny forget it! got it solved :grinning:

1 Like

Hi! @aestela Could you please tell me how you solved it? I am stuck on the same issue

Hi @the_sal_dave could you share your API config?

Hi @johnny , sometimes after i setup the call succesfully it starts failing and showing me this error that tells me to set it up correctly, and when i go and check on it, it has the same red advertency that you have on the screenshot, does this affect my call? do you have an idea of how i can fix this?

Is this issue happening in production? Mine works fine although in the API Connector it does say:

I think you only run again to get another token if you need to modify your calls

@johnny Yes, after a few test suddenly i get this message:

this is how my call i set up:

Sometimes i do small changes like deleting and re-entering the same scopes and it gets solved, but if use just the email, profile and openid scopes it throws this error, but those are the only scopes i need

Hmm what’s the full error it gives? The screenshot is cut off for me

This one
image

And this happens after your initialize it?

Hi! I also have the same issue! Would love to learn how you solved this. Thanks!

hey man, I am using google oauth instead of microsoft for this
when I set the user email key path as a custom field like email2 or something , the user gets created with a blank email fields and the email2 field never gets filled.

have you come across this before

I’m glad to hear you figured out the Auth0 integration! Regarding the Teams API issue, it appears to be an unusual behavior. Have you read the API documentation or consulted with support/community for information?sso login

How are you guys getting the token and refresh token?

In case anyone else needs to know this - the above still works. I omitted the offline scope and then added a new API call to get the profile info:

GET https://graph.microsoft.com/v1.0/me
And from within this call you can get more user info - such as display name (or first/last names).

Remember you can only run this second call this once you’ve run the social login in debug mode (to get the first token).

@johnny I’m curious if this setup works with the Microsoft 365 Authenticator App or if it’s just single sign on with Microsoft…or both? Sorry if this is a dumb question.

It’s oauth to sign in with microsoft