Assign Role to User
Assign a role to an Office 365 user.
The Assign Role to User card doesn't support custom roles. Okta returns an error if you try to assign a custom role using this action card.
Options
| Field | Definition | Type | Required | 
|---|---|---|---|
| 
                                                                         Role Id  | 
                                                                    
                                                                         Identify the ID of the Office 365 role that is assigned to a specified user.  | 
                                                                    Dropdown | TRUE | 
| 
                                                                         Role Template Id  | 
                                                                    
                                                                         Identify the ID of the Office 365 directoryRoleTemplate on which the role to be assigned to a specified user is based. The property must be specified when activating a directory role in a tenant with a POST operation. After the directory role has been activated, the property is read only.  | 
                                                                    Dropdown | TRUE | 
Input
| Field | Definition | Type | Required | 
|---|---|---|---|
| 
                                                                         User  | 
                                                                |||
| 
                                                                         Id or Username  | 
                                                                    
                                                                         User ID or username of the Office 365 user. This is the user's User Principal Name (UPN). A UPN is formed by taking the username and domain and combining them with the @ separator. For example, john.doe@somedomain.com. This could be the user's email address, but this isn't true in all cases. This field displays when Role Template Id is selected in Options.  | 
                                                                    Text | TRUE | 
| 
                                                                         Role ID  | 
                                                                    
                                                                         Unique ID for the role. This field displays when Role Id is selected in Options.  | 
                                                                    Text | TRUE | 
| 
                                                                         Role  | 
                                                                |||
| 
                                                                         Id  | 
                                                                    
                                                                         ID of the directoryRoleTemplate on which this role is based. The property must be specified when activating a directory role in a tenant with a POST operation. After the directory role has been activated, the property is read only. This field displays when Role Template Id is selected in Options.  | 
                                                                    Text | TRUE | 
If the string for the UPN input begins with the $character, remove the slash / after /users and enclose the UPN value in parentheses and single quotes. For example, /users('$AdeleVance@contoso.com'). See Known issues with Microsoft Graph.
To search for a B2B user using a UPN input value, encode the hash # character as %23. For example, /users/AdeleVance_adatum.com%23EXT%23@contoso.com.
Output
| Field | Definition | Type | 
|---|---|---|
| 
                                                                         Status Code  | 
                                                                    
                                                                         Result of the operation. The connector returns an HTTP status code that indicates whether the action taken by the card succeeded or failed. For example: 
 For a full list of possible status codes, see HTTP status codes.  | 
                                                                    Number | 
