# OAuth Microsoft SSO with Bubble.io

**URL:** <https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631>\
**Category:** APIs\
**Created:** [June 26, 2023, 12:15pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631 "2023-06-26T12:15:47Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![aestela](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aestela/32/140161_2.png) [@aestela](https://forum.bubble.io/u/aestela)\
**Post date:** [November 2, 2023, 1:58am UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/21 "2023-11-02T01:58:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [November 2, 2023, 5:53am UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/22 "2023-11-02T05:53:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aestela](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aestela/32/140161_2.png) [@aestela](https://forum.bubble.io/u/aestela)\
**Post date:** [November 2, 2023, 1:34pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/23 "2023-11-02T13:34:58Z")

</div>

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](https://us1.discourse-cdn.com/bubble/original/3X/a/9/a923cf6bd7320d1d44631c509d801a067d603b4f.png)

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).

---

<div class="post-metadata">

**Author:** ![aestela](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aestela/32/140161_2.png) [@aestela](https://forum.bubble.io/u/aestela)\
**Post date:** [November 2, 2023, 2:23pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/24 "2023-11-02T14:23:57Z")

</div>

@johnny forget it! got it solved 😀

---

<div class="post-metadata">

**Author:** ![the\_sal\_dave](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/the_sal_dave/32/190831_2.png) [@the\_sal\_dave](https://forum.bubble.io/u/the_sal_dave)\
**Post date:** [January 12, 2024, 3:14am UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/25 "2024-01-12T03:14:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aestela](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aestela/32/140161_2.png) [@aestela](https://forum.bubble.io/u/aestela)\
**Post date:** [January 12, 2024, 4:08pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/26 "2024-01-12T16:08:47Z")

</div>

Hi @the_sal_dave could you share your API config?

---

<div class="post-metadata">

**Author:** ![oswaldo](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@oswaldo](https://forum.bubble.io/u/oswaldo)\
**Post date:** [February 13, 2024, 7:33pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/27 "2024-02-13T19:33:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [February 13, 2024, 7:57pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/28 "2024-02-13T19:57:12Z")

</div>

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

 ![Screenshot 2024-02-13 at 11.56.27](https://us1.discourse-cdn.com/bubble/original/3X/7/6/76d11adf16052bc1960b18728f6fe19e016e377b.png)

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

---

<div class="post-metadata">

**Author:** ![oswaldo](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@oswaldo](https://forum.bubble.io/u/oswaldo)\
**Post date:** [February 13, 2024, 8:49pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/29 "2024-02-13T20:49:43Z")

</div>

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

this is how my call i set up:

 ![Sin título2](https://us1.discourse-cdn.com/bubble/original/3X/f/6/f6a354a2acfc665437cfe791a0f40812fab321e8.png)

---

<div class="post-metadata">

**Author:** ![oswaldo](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@oswaldo](https://forum.bubble.io/u/oswaldo)\
**Post date:** [February 13, 2024, 8:57pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/30 "2024-02-13T20:57:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [February 13, 2024, 10:08pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/31 "2024-02-13T22:08:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![oswaldo](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@oswaldo](https://forum.bubble.io/u/oswaldo)\
**Post date:** [February 13, 2024, 11:56pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/32 "2024-02-13T23:56:15Z")

</div>

This one  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/c/ac5d184655fa6484dacbde1d9bdefb88dc38ee12.png)

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [February 14, 2024, 1:33am UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/33 "2024-02-14T01:33:35Z")

</div>

And this happens after your initialize it?

---

<div class="post-metadata">

**Author:** ![shashi](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@shashi](https://forum.bubble.io/u/shashi)\
**Post date:** [April 10, 2024, 9:37pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/34 "2024-04-10T21:37:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![abhjoseph](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/abhjoseph/32/258380_2.png) [@abhjoseph](https://forum.bubble.io/u/abhjoseph)\
**Post date:** [May 3, 2024, 2:10pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/35 "2024-05-03T14:10:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![abcsd5593](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@abcsd5593](https://forum.bubble.io/u/abcsd5593)\
**Post date:** [May 9, 2024, 9:38pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/36 "2024-05-09T21:38:33Z")

</div>

> [@cliffwoodjames](#):
>
> Lol dont worry I got it working, I do seem to be struggling with the Teams API refusing to accept dynamic data but it’ll accept the same data if it’s static plain text - not sure if you know anything about this?

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](https://ssoidportal.org/)

---

<div class="post-metadata">

**Author:** ![chad](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chad/32/89415_2.png) [@chad](https://forum.bubble.io/u/chad)\
**Post date:** [May 10, 2024, 9:22pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/38 "2024-05-10T21:22:07Z")

</div>

How are you guys getting the token and refresh token?

---

<div class="post-metadata">

**Author:** ![manipaje](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@manipaje](https://forum.bubble.io/u/manipaje)\
**Post date:** [June 24, 2024, 10:19am UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/39 "2024-06-24T10:19:34Z")

</div>

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](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).

---

<div class="post-metadata">

**Author:** ![cbray](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@cbray](https://forum.bubble.io/u/cbray)\
**Post date:** [December 10, 2024, 10:47pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/40 "2024-12-10T22:47:37Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 10, 2024, 11:42pm UTC](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631/41 "2024-12-10T23:42:53Z")

</div>

It’s oauth to sign in with microsoft

[Previous page](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631.md?page=1)

[Next page](https://forum.bubble.io/t/oauth-microsoft-sso-with-bubble-io/269631.md?page=3)
