diff --git a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html
index a18393dd08..4ec00be443 100644
--- a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html
+++ b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html
@@ -41,7 +41,7 @@
Workflow Templates
@@ -65,6 +65,7 @@
Organizations
diff --git a/awx/ui/client/src/shared/stateDefinitions.factory.js b/awx/ui/client/src/shared/stateDefinitions.factory.js
index 651c484ae7..e4af7aeb51 100644
--- a/awx/ui/client/src/shared/stateDefinitions.factory.js
+++ b/awx/ui/client/src/shared/stateDefinitions.factory.js
@@ -313,9 +313,14 @@ function($injector, $stateExtender, $log, i18n) {
return qs.search(path, $stateParams[`${list.iterator}_search`]);
}
],
- credentialsDataset: ['CredentialList', 'QuerySet', '$stateParams', 'GetBasePath',
- function(list, qs, $stateParams, GetBasePath) {
+ credentialsDataset: ['CredentialList', 'QuerySet', '$stateParams', 'GetBasePath', 'resourceData',
+ function(list, qs, $stateParams, GetBasePath, resourceData) {
let path = GetBasePath(list.basePath) || GetBasePath(list.name);
+
+ if(resourceData.data.type === "team") {
+ $stateParams[`${list.iterator}_search`].organization = resourceData.data.organization;
+ }
+
return qs.search(path, $stateParams[`${list.iterator}_search`]);
}
],