# Assign roles from Cognito OpenID IdP

**URL:** <https://forum.inductiveautomation.com/t/assign-roles-from-cognito-openid-idp/74751>\
**Category:** Ignition\
**Created:** [June 8, 2023, 8:02am UTC](https://forum.inductiveautomation.com/t/assign-roles-from-cognito-openid-idp/74751 "2023-06-08T08:02:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@scott](https://forum.inductiveautomation.com/u/scott)\
**Post date:** [June 8, 2023, 8:02am UTC](https://forum.inductiveautomation.com/t/assign-roles-from-cognito-openid-idp/74751/1 "2023-06-08T08:02:03Z")

</div>

I am trying to set up AWS Cognito as the IdP for my Ignition project.  
I can map most attributes but not the Roles.  
the Roles field I am trying to map is an array e.g. `[operators, supervisors]`

Has anyone had similar issues with this? I get the feeling it's just a silly little error but not having any luck getting it working.

Edit: I have also tried mapping to the "custom:roles" field in case the array was the issue but this also does not map.

test login IdP respose data:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/0619d02b5ed00d0b67766e29e74b774c36ed6143.png)

test login mapped attributes:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f93ba8cb75f723563ff4c4baf876800820b56810.png)

attribute mapping config:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/4/a4f650375373058db4d7e2922b38ad3e5528d3ed.png)

---

<div class="post-metadata">

**Author:** ![scott](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@scott](https://forum.inductiveautomation.com/u/scott)\
**Post date:** [June 15, 2023, 6:40am UTC](https://forum.inductiveautomation.com/t/assign-roles-from-cognito-openid-idp/74751/2 "2023-06-15T06:40:19Z")

</div>

Worked it out with the help of iControls support team.

It seems the colon was problematic, needed to wrap it in square brackets and double quotes and it parsed correctly.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/d/cdc8cc25db074f25ba149dbd5750ab0e17c454de.png)
