diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py
index eb4c4a8..089f3af 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -98,17 +98,20 @@
 
 @six.add_metaclass(abc.ABCMeta)
 class CredentialProvider(object):
-    def __init__(self, identity_version, name=None,
-                 network_resources=None):
+    def __init__(self, identity_version, name=None, network_resources=None,
+                 credentials_domain=None):
         """A CredentialProvider supplies credentials to test classes.
         :param identity_version: Identity version of the credentials provided
         :param name: Name of the calling test. Included in provisioned
                      credentials when credentials are provisioned on the fly
         :param network_resources: Network resources required for the
                                   credentials
+        :param credentials_domain: Domain credentials belong to
         """
-        self.name = name or "test_creds"
         self.identity_version = identity_version
+        self.name = name or "test_creds"
+        self.network_resources = network_resources
+        self.credentials_domain = credentials_domain or 'Default'
         if not auth.is_identity_version_supported(self.identity_version):
             raise exceptions.InvalidIdentityVersion(
                 identity_version=self.identity_version)
diff --git a/tempest/common/credentials.py b/tempest/common/credentials.py
index 1b2eca7..88ae9ce 100644
--- a/tempest/common/credentials.py
+++ b/tempest/common/credentials.py
@@ -37,13 +37,15 @@
         return dynamic_creds.DynamicCredentialProvider(
             name=name,
             network_resources=network_resources,
-            identity_version=identity_version)
+            identity_version=identity_version,
+            credentials_domain=CONF.auth.default_credentials_domain_name)
     else:
         if (CONF.auth.test_accounts_file and
                 os.path.isfile(CONF.auth.test_accounts_file)):
             # Most params are not relevant for pre-created accounts
             return preprov_creds.PreProvisionedCredentialProvider(
-                name=name, identity_version=identity_version)
+                name=name, identity_version=identity_version,
+                credentials_domain=CONF.auth.default_credentials_domain_name)
         else:
             return preprov_creds.NonLockingCredentialProvider(
                 name=name, identity_version=identity_version)
diff --git a/tempest/common/dynamic_creds.py b/tempest/common/dynamic_creds.py
index d9cfac8..7413c8c 100644
--- a/tempest/common/dynamic_creds.py
+++ b/tempest/common/dynamic_creds.py
@@ -30,11 +30,12 @@
 
 class DynamicCredentialProvider(cred_provider.CredentialProvider):
 
-    def __init__(self, identity_version, name=None,
-                 network_resources=None):
+    def __init__(self, identity_version, name=None, network_resources=None,
+                 credentials_domain=None):
         super(DynamicCredentialProvider, self).__init__(
-            identity_version, name, network_resources)
-        self.network_resources = network_resources
+            identity_version=identity_version, name=name,
+            network_resources=network_resources,
+            credentials_domain=credentials_domain)
         self._creds = {}
         self.ports = []
         self.default_admin_creds = cred_provider.get_configured_credentials(
@@ -49,7 +50,7 @@
         if self.identity_version == 'v3':
             self.creds_domain_name = (
                 self.default_admin_creds.project_domain_name or
-                CONF.auth.default_credentials_domain_name)
+                self.credentials_domain)
         self.creds_client = cred_client.get_creds_client(
             self.identity_admin_client, self.creds_domain_name)
 
diff --git a/tempest/common/preprov_creds.py b/tempest/common/preprov_creds.py
index 48eae25..c951972 100644
--- a/tempest/common/preprov_creds.py
+++ b/tempest/common/preprov_creds.py
@@ -39,9 +39,10 @@
 
 class PreProvisionedCredentialProvider(cred_provider.CredentialProvider):
 
-    def __init__(self, identity_version, name=None):
+    def __init__(self, identity_version, name=None, credentials_domain=None):
         super(PreProvisionedCredentialProvider, self).__init__(
-            identity_version=identity_version, name=name)
+            identity_version=identity_version, name=name,
+            credentials_domain=credentials_domain)
         if (CONF.auth.test_accounts_file and
                 os.path.isfile(CONF.auth.test_accounts_file)):
             accounts = read_accounts_yaml(CONF.auth.test_accounts_file)
@@ -217,7 +218,7 @@
             if ('user_domain_name' in init_attributes and 'user_domain_name'
                     not in hash_attributes):
                 # Allow for the case of domain_name populated from config
-                domain_name = CONF.auth.default_credentials_domain_name
+                domain_name = self.credentials_domain
                 hash_attributes['user_domain_name'] = domain_name
             if all([getattr(creds, k) == hash_attributes[k] for
                    k in init_attributes]):
@@ -306,8 +307,7 @@
         if self.identity_version == 'v3':
             user_domain_fields = set(['user_domain_name', 'user_domain_id'])
             if not user_domain_fields.intersection(set(creds_dict.keys())):
-                _domain = CONF.auth.default_credentials_domain_name
-                creds_dict['user_domain_name'] = _domain
+                creds_dict['user_domain_name'] = self.credentials_domain
         return creds_dict
 
 
