# Issuer metadata error when creating a new connection via the Management API

**URL:** <https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956>\
**Category:** Get Help\
**Tags:** management-api, auth0\
**Created:** [August 15, 2021, 2:08am UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956 "2021-08-15T02:08:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.otts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brian.otts/32/12851_2.png) [@brian.otts](https://community.auth0.com/u/brian.otts)\
**Post date:** [August 15, 2021, 2:08am UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956/1 "2021-08-15T02:08:53Z")

</div>

Hi,

I’m trying to create a new OpenID Connect connection with Cognito. I’m getting the following error about missing metadata attributes that are in request:

{  
“statusCode”: 400,  
“error”: “Bad Request”,  
“message”: “Issuer metadata missing the following attributes: issuer, authorization\_endpoint, jwks\_uri”,  
“errorCode”: “invalid\_body”  
}

Here’s the request with some data obfuscated:

{  
“name”: “cognito-connection-apiCreated”,  
“display\_name”: “Cognito OIDC API Created”,  
“strategy”: “oidc”,  
“options”: {  
“set\_user\_root\_attributes”: “on\_each\_login”,  
“client\_id”: “”,  
“scope”: “profile email openid”,  
“upstream\_params”: {  
“client\_secret”: {  
“value”: “”  
}  
}  
},  
“metadata”: {  
“issuer”: “[https://cognito-idp.us-east-1.amazonaws.com/us-east-1\_genscj3V4](https://cognito-idp.us-east-1.amazonaws.com/us-east-1_genscj3V4)”,  
“authorization\_endpoint”: “[https://otts-vitro-customer-domain.auth.us-east-1.amazoncognito.com/oauth2/authorize](https://otts-vitro-customer-domain.auth.us-east-1.amazoncognito.com/oauth2/authorize)”,  
“jwks\_uri”: “[https://cognito-idp.us-east-1.amazonaws.com/us-east-1\_genscj3V4/.well-known/jwks.json](https://cognito-idp.us-east-1.amazonaws.com/us-east-1_genscj3V4/.well-known/jwks.json)”  
}  
}

Any idea what’s wrong? Also, is this any easier to work with through the Node.js or Go SDK?

Thanks!  
Brian

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [August 16, 2021, 8:08pm UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956/3 "2021-08-16T20:08:22Z")

</div>

Hi @brian.otts,

Welcome to the Auth0 Community!

Can you try to pass them as part of the `options` object? That is how they are being returned if I get an OIDC connection.

---

<div class="post-metadata">

**Author:** ![brian.otts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brian.otts/32/12851_2.png) [@brian.otts](https://community.auth0.com/u/brian.otts)\
**Post date:** [August 16, 2021, 10:14pm UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956/4 "2021-08-16T22:14:04Z")

</div>

Hi @dan.woda,

Thanks for the reply. I tried that and got this error:  
{  
“statusCode”: 400,  
“error”: “Bad Request”,  
“message”: “Unrecognized options: metadata”,  
“errorCode”: “invalid\_body”  
}

It may end up being easier to use Terraform here instead.

---

<div class="post-metadata">

**Author:** ![brian.otts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brian.otts/32/12851_2.png) [@brian.otts](https://community.auth0.com/u/brian.otts)\
**Post date:** [August 16, 2021, 10:41pm UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956/5 "2021-08-16T22:41:13Z")

</div>

Ahh, I see. I actually added a metadata element with issuer, authorization\_endpoint, and jwks\_uri, but it just needed to be directly in option, e.g. options.issuer, options.jwks\_uri, etc. When it said “Issuer metadata missing,” I thought it meant that it needed a metadata object in options, e.g. options.metadata.issuer, etc. Thanks for the help!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [August 17, 2021, 6:59pm UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956/6 "2021-08-17T18:59:24Z")

</div>

Glad you got it sorted!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 1, 2021, 7:00pm UTC](https://community.auth0.com/t/issuer-metadata-error-when-creating-a-new-connection-via-the-management-api/67956/7 "2021-09-01T19:00:01Z")

</div>

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