# OAuth Issues when creating Microsoft credentials

**URL:** <https://community.n8n.io/t/oauth-issues-when-creating-microsoft-credentials/21974>\
**Category:** Questions\
**Created:** [January 18, 2023, 8:00am UTC](https://community.n8n.io/t/oauth-issues-when-creating-microsoft-credentials/21974 "2023-01-18T08:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soba-james](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/soba-james/32/21420_2.png) [@soba-james](https://community.n8n.io/u/soba-james)\
**Post date:** [January 18, 2023, 8:00am UTC](https://community.n8n.io/t/oauth-issues-when-creating-microsoft-credentials/21974/1 "2023-01-18T08:00:00Z")

</div>

Hi there, I have followed the steps to configure my Microsoft credentials and the initial OAuth step was triggered properly. However, when I’m sent back to the redirect URL, I am presented with an error:

```auto
{"code":0,"message":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."}

```

This is the callback URL with parameters:

```auto
https://<my-hosted-domain>/rest/oauth2-credential/callback?code=somecode&state=somestate%3d%3d

```

Does anyone know what is wrong?

---

<div class="post-metadata">

**Author:** ![soba-james](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/soba-james/32/21420_2.png) [@soba-james](https://community.n8n.io/u/soba-james)\
**Post date:** [January 19, 2023, 8:28am UTC](https://community.n8n.io/t/oauth-issues-when-creating-microsoft-credentials/21974/2 "2023-01-19T08:28:16Z")

</div>

A quick update with my current progress, I was able to configure this correctly.

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [January 26, 2023, 10:26am UTC](https://community.n8n.io/t/oauth-issues-when-creating-microsoft-credentials/21974/3 "2023-01-26T10:26:15Z")

</div>

Hi @soba-james, welcome to the community 🎉

Glad to hear you figured it out, Microsoft’s OAuth2 credentials are rather tricky and not exactly self-explanatory.

In case anyone else stumbles across this, [the thread over here](http://community.n8n.io/t/microsoft-graph-security-oauth2-api/19510/) has a number of screenshots that might help with setting this up.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 26, 2023, 10:26am UTC](https://community.n8n.io/t/oauth-issues-when-creating-microsoft-credentials/21974/4 "2023-04-26T10:26:21Z")

</div>

Closed on April 26, 2023, 10:26am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
