# system.kanoa.security.addRole(roleInfo, userId)

Add a new user role

---
### Parameters
**roleInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - roleName</td><td>String</td><td></td></tr>	
 	<tr><td> - userSource</td><td>String</td><td></td></tr>	
	</tbody>
</table>

**userId** `Integer`: Id of user executing the function<br />

---
### Returns
**roleId** `Integer`<br />
**msg** `String` None if success<br />

---
### Example
```python
userId = 123
roleId = system.kanoa.security.addRole({'roleName': 'Operator', 'userSource': 'default'}, userId)
```
