[← back to SAML overview](/docs/saml/)

# Okta - SAML login on CloudAMQP

1. Navigate to the admin portal, in the _Applications view, click_ **Create App Integration**![Saml Okta Add Application](/img/docs/saml-okta/Okta-1.png)

2. In the dialog that opens, select the _SAML 2.0_ option, then click **next**![Saml Okta Create app Next](/img/docs/saml-okta/Okta-2.png)

3. In Step 1 **General Settings**, enter `CloudAMQP`, as an example, in the _App name_ field, then click the green **Next** button. ![Saml Okta Create app next](/img/docs/saml-okta/Okta-3.png)

4. In Step 2A _SAML Setting_ do the following.
   - In the _Single sign on URL_ field, enter `https://customer.cloudamqp.com/login/saml` and check the box _Use this for Recipient URL and Destination URL_
   - For _Audience URI (SP Entity ID)_, go to [https://customer.cloudamqp.com/team/saml](https://customer.cloudamqp.com/team/saml) and copy your _SAML Audience URL/Audience URI/SP Entity ID/SAML Metadata_ to this field.
   - In the field _Name ID format_ pick _EmailAddress_ from the drop down list ![Okta Create app settings](/img/docs/saml-okta/Okta-4.png)
5. In the step _Feedback_ select _I’m an Okta customer adding an internal app_, and _This is an internal app that we have created_, then click **Finish**![Okta Create app finalize](/img/docs/saml-okta/Okta-5.png)

6. The IdP Metadata now has to be uploaded to [https://customer.cloudamqp.com/team/saml](https://customer.cloudamqp.com/team/saml).

   Download the file from Okta, under the menu option _Applications_, click on your recently created application, and the tab **Sign On** From here you can download the file that you have to upload to CloudAMQP by clicking **Copy** and paste the link in browser, then right click - save as - and name it metadata.xml.

   ![Okta Create app Metadata](/img/docs/saml-okta/Okta-6.png)

7. In order to assign users with roles and tags, scroll down to Attribute Statements under Sign On. Expand the legacy configuration, and under “Profile attribute statements”, assign `84codes.roles` to `appuser.roles`. ![Okta Create app Metadata](/img/docs/saml-okta/Okta-7.png)

8. Go to the menu option _Directory -\> Profile Editor_ and click on the app you just created. ![Okta setup Roles](/img/docs/saml-okta/Okta-8.png)

9. Click the **Add Attribute** button. ![Okta setup Roles](/img/docs/saml-okta/Okta-9.png)

10. Enter the information as requested, making sure the variable name is `roles`, as it is used in the previous step _(appname.roles)_. Under _Attribute Members_, enter the roles you wish to be able to chose from. The _Value_ field contains the teams’ unique code followed by / and the role name or tag. The exact values to use are listed as examples in your CloudAMQP settings at: [https://customer.cloudamqp.com/team/saml](https://customer.cloudamqp.com/team/saml) ![Okta setup Roles](/img/docs/saml-okta/Okta-10.png)

11. Click **Save**

12. To assign the roles to your members go to the menu option _Applications -\> Applications_, click on your created app in the list and the pen symbol next to a team member. From the drop-down, you should now be able to chose a role for this user. ![Okta setup Roles](/img/docs/saml-okta/Okta-11.png)

13. Click **Save**

14. If you prefer to use group assignments, select “group” and “combine groups” in the attribute. ![Okta setup Roles](/img/docs/saml-okta/Okta-12.png)

15. Then you can assign the Application to a group, and select a separate role per group. Then have a user be a member of one or more groups to get both role and tag assigned. Note you can only pass the attribute to either user or group, not both. ![Okta setup Roles](/img/docs/saml-okta/Okta-13.png)
