# Programmatically refreshing available SAML Roles for AWS Apps

**URL:** <https://devforum.okta.com/t/programmatically-refreshing-available-saml-roles-for-aws-apps/8173>\
**Category:** SAML\
**Created:** [February 20, 2020, 8:51am UTC](https://devforum.okta.com/t/programmatically-refreshing-available-saml-roles-for-aws-apps/8173 "2020-02-20T08:51:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dunindd](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dunindd](https://devforum.okta.com/u/dunindd)\
**Post date:** [February 20, 2020, 8:51am UTC](https://devforum.okta.com/t/programmatically-refreshing-available-saml-roles-for-aws-apps/8173/1 "2020-02-20T08:51:07Z")

</div>

I’m working on a solution to allow users to assign roles created in AWS to groups in Okta using Terraform. The solution is fully functional for my needs with one rather thorny inconvenience: Okta will reject profiles containing unknown roles. This means that if someone adds a role to AWS, and then tries to assign this role to a group in Okta, they will not be able to do so until Okta is made aware of said role. This seems to happen in the admin console by sending a POST request to either of these two end-points:

/admin/org/app/download  
/admin/app/amazon\_aws/instance/\<app\_id\>/settings/user-mgmt

I cannot seem to find an API to manage user-mgmt settings, or a way to invoke the Refresh Application Data function programatically. Is this functionality available outside of the console?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 9:13pm UTC](https://devforum.okta.com/t/programmatically-refreshing-available-saml-roles-for-aws-apps/8173/4 "2024-02-12T21:13:57Z")

</div>


