# SAML Delegation

**URL:** <https://community.auth0.com/t/saml-delegation/7062>\
**Category:** Get Help\
**Tags:** delegation, api, saml\
**Created:** [June 14, 2017, 6:57pm UTC](https://community.auth0.com/t/saml-delegation/7062 "2017-06-14T18:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthilnathansv](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@senthilnathansv](https://community.auth0.com/u/senthilnathansv)\
**Post date:** [June 14, 2017, 6:57pm UTC](https://community.auth0.com/t/saml-delegation/7062/1 "2017-06-14T18:57:03Z")

</div>

Once I login, I get id\_token.  
I am creating below POST Request to delegation endpoint.  
{  
“client\_id” : “_[CLIENT\_ID]_”,  
“grant\_type” : “urn:ietf:params:oauth:grant-type:jwt-bearer”,  
“target” : “_[CLIENT\_ID]_”,  
“api\_type” : “aws”,  
“id\_token” : “_[id\_token\_obtained after login]_”  
}  
But I am getting back a response as follows:  
{“error”:“invalid\_token”,“error\_description”:“invalid algorithm”,“statusCode”:401}

Log Error is as follows:  
{  
“date”: “2017-06-14T03:15:23.522Z”,  
“type”: “fd”,  
**“description”: “invalid algorithm”** ,  
“connection\_id”: “”,  
“client\_id”: “UyzWPIqMmZ4cUsIPzVC8b4FScyZLZGfh”,  
“client\_name”: “okin”,  
“ip”: “_[IP address]_”,  
“user\_agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_12\_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36”,  
“details”: {  
“grant\_type”: “urn:ietf:params:oauth:grant-type:jwt-bearer”,  
“target”: “_[CLIENT\_ID]_”,  
“api\_type”: “aws”  
},  
“log\_id”: “49573801565560042589843000629440086346616206749985669154”  
}

---

<div class="post-metadata">

**Author:** ![senthilnathansv](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@senthilnathansv](https://community.auth0.com/u/senthilnathansv)\
**Post date:** [June 16, 2017, 8:50am UTC](https://community.auth0.com/t/saml-delegation/7062/2 "2017-06-16T08:50:56Z")

</div>

Set Advanced Setting \> Oauth \> JsonWebTokenAlgorithm needs to be set to RS256  
Else Amazon will return 401 / invalid token

---

<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:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/saml-delegation/7062/3 "2018-03-02T05:54:38Z")

</div>


