diff --git a/manila_tempest_tests/tests/api/admin/test_replication.py b/manila_tempest_tests/tests/api/admin/test_replication.py
index a0c0d84..a40c94f 100644
--- a/manila_tempest_tests/tests/api/admin/test_replication.py
+++ b/manila_tempest_tests/tests/api/admin/test_replication.py
@@ -20,6 +20,7 @@
 from manila_tempest_tests.common import constants
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
 
 CONF = config.CONF
 _MIN_SUPPORTED_MICROVERSION = '2.11'
@@ -36,6 +37,8 @@
         cls.admin_client = cls.admin_shares_v2_client
         cls.member_client = cls.shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -45,6 +48,11 @@
         extra_specs = {"replication_type": cls.replication_type}
         cls.share_type = cls._create_share_type(extra_specs)
         cls.share_type_id = cls.share_type['id']
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.sn_id = cls.share_network['id']
 
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type, client=cls.admin_client)
@@ -54,6 +62,7 @@
         # Create share with above share_type
         cls.share = cls.create_share(share_type_id=cls.share_type_id,
                                      availability_zone=cls.share_zone,
+                                     share_network_id=cls.sn_id,
                                      client=cls.admin_client)
         cls.replica = cls.admin_client.list_share_replicas(
             share_id=cls.share['id'])[0]
@@ -74,7 +83,7 @@
                 msg % ','.join(constants.REPLICATION_PROMOTION_CHOICES))
         share = self.create_share(
             share_type_id=self.share_type_id, client=self.admin_client,
-            availability_zone=self.share_zone)
+            availability_zone=self.share_zone, share_network_id=self.sn_id)
         original_replica = self.admin_client.list_share_replicas(
             share_id=share['id'])[0]
 
diff --git a/manila_tempest_tests/tests/api/admin/test_replication_actions.py b/manila_tempest_tests/tests/api/admin/test_replication_actions.py
index a278751..b5b0f42 100644
--- a/manila_tempest_tests/tests/api/admin/test_replication_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_replication_actions.py
@@ -18,6 +18,7 @@
 from manila_tempest_tests.common import constants
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
 
 CONF = config.CONF
 _MIN_SUPPORTED_MICROVERSION = '2.11'
@@ -37,6 +38,8 @@
         cls.admin_client = cls.admin_shares_v2_client
         cls.member_client = cls.shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -48,6 +51,12 @@
         cls.share_type = cls._create_share_type(extra_specs)
         cls.share_type_id = cls.share_type['id']
 
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.sn_id = cls.share_network['id']
+
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type, client=cls.admin_client)
         cls.share_zone = cls.zones[0]
@@ -57,6 +66,7 @@
         cls.share = cls.create_share(size=CONF.share.share_size + 1,
                                      share_type_id=cls.share_type_id,
                                      availability_zone=cls.share_zone,
+                                     share_network_id=cls.sn_id,
                                      client=cls.admin_client)
         cls.replica = cls.admin_client.list_share_replicas(
             share_id=cls.share['id'])[0]
@@ -93,6 +103,7 @@
         share = self.create_share(size=2,
                                   share_type_id=self.share_type_id,
                                   availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id,
                                   cleanup_in_class=True,
                                   client=self.admin_client)
         share = self.admin_client.get_share(share["id"])
@@ -139,6 +150,7 @@
         """Unmanage a replication type share that does not have replica."""
         share = self.create_share(size=2,
                                   share_type_id=self.share_type_id,
+                                  share_network_id=self.sn_id,
                                   availability_zone=self.share_zone,
                                   client=self.admin_client)
         self.admin_client.unmanage_share(share['id'])
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index eca162a..113a669 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -756,7 +756,8 @@
     def create_share_replica(cls, share_id, availability_zone, client=None,
                              cleanup_in_class=False, cleanup=True):
         client = client or cls.shares_v2_client
-        replica = client.create_share_replica(share_id, availability_zone)
+        replica = client.create_share_replica(
+            share_id, availability_zone=availability_zone)
         resource = {
             "type": "share_replica",
             "id": replica["id"],
diff --git a/manila_tempest_tests/tests/api/test_replication.py b/manila_tempest_tests/tests/api/test_replication.py
index d827c8d..cfb5812 100644
--- a/manila_tempest_tests/tests/api/test_replication.py
+++ b/manila_tempest_tests/tests/api/test_replication.py
@@ -21,6 +21,7 @@
 from manila_tempest_tests.common import constants
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
 
 CONF = config.CONF
 _MIN_SUPPORTED_MICROVERSION = '2.11'
@@ -41,6 +42,8 @@
         name = data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX)
         cls.admin_client = cls.admin_shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -64,6 +67,13 @@
             'share_type_id': cls.share_type['id'],
             'availability_zone': cls.share_zone,
         }}
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.creation_data['kwargs'].update({
+                'share_network_id': cls.share_network['id']})
+            cls.sn_id = cls.share_network['id']
 
         # Data for creating shares in parallel
         data = [cls.creation_data, cls.creation_data]
@@ -145,6 +155,28 @@
         self.delete_share_replica(share_replica["id"])
 
     @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
+    @testtools.skipIf(
+        not CONF.share.multitenancy_enabled, "Only for multitenancy.")
+    @base.skip_if_microversion_not_supported("2.51")
+    def test_add_delete_share_replica_different_subnet(self):
+        # Create new subnet in replica az
+        subnet = utils.share_network_get_default_subnet(self.share_network)
+        data = {
+            'neutron_net_id': subnet.get('neutron_net_id'),
+            'neutron_subnet_id': subnet.get('neutron_subnet_id'),
+            'share_network_id': self.sn_id,
+            'availability_zone': self.replica_zone,
+        }
+        subnet = self.create_share_network_subnet(**data)
+        # Create the replica
+        share_replica = self._verify_create_replica()
+
+        # Delete the replica
+        self.delete_share_replica(share_replica["id"])
+        # Delete subnet
+        self.shares_v2_client.delete_subnet(self.sn_id, subnet['id'])
+
+    @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
     def test_add_access_rule_create_replica_delete_rule(self):
         # Add access rule to the share
         access_type, access_to = self._get_access_rule_data_from_config()
@@ -260,7 +292,7 @@
 
         share = self.create_share(
             share_type_id=self.share_type['id'], cleanup_in_class=False,
-            availability_zone=self.share_zone)
+            availability_zone=self.share_zone, share_network_id=self.sn_id)
         share = self.shares_v2_client.get_share(share['id'])
         replica = self.create_share_replica(share['id'], self.replica_zone)
         replica = self.shares_v2_client.get_share_replica(replica['id'])
@@ -328,6 +360,8 @@
         name = data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX)
         cls.admin_client = cls.admin_shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -352,6 +386,13 @@
             'availability_zone': cls.share_zone,
         }}
 
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.creation_data['kwargs'].update({
+                'share_network_id': cls.share_network['id']})
+        cls.sn_id = (
+            cls.share_network['id'] if cls.multitenancy_enabled else None)
         # Data for creating shares in parallel
         data = [cls.creation_data, cls.creation_data]
         cls.shares = cls.create_shares(data)
diff --git a/manila_tempest_tests/tests/api/test_replication_export_locations.py b/manila_tempest_tests/tests/api/test_replication_export_locations.py
index 4313edb..165b40b 100644
--- a/manila_tempest_tests/tests/api/test_replication_export_locations.py
+++ b/manila_tempest_tests/tests/api/test_replication_export_locations.py
@@ -37,6 +37,8 @@
         name = data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX)
         cls.admin_client = cls.admin_shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -48,6 +50,11 @@
             name,
             extra_specs=cls.extra_specs,
             client=cls.admin_client)
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.sn_id = cls.share_network['id']
         cls.share_type = share_type["share_type"]
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type)
@@ -60,7 +67,8 @@
 
     def _create_share_and_replica_get_exports(self, cleanup_replica=True):
         share = self.create_share(share_type_id=self.share_type['id'],
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         replica = self.create_share_replica(share['id'], self.replica_zone,
                                             cleanup=cleanup_replica)
         replicas = self.shares_v2_client.list_share_replicas(
diff --git a/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py b/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py
index af2b1b3..64d2c2c 100644
--- a/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py
+++ b/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py
@@ -35,6 +35,8 @@
         name = data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX)
         cls.admin_client = cls.admin_shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -47,6 +49,11 @@
             extra_specs=cls.extra_specs,
             client=cls.admin_client)
         cls.share_type = share_type["share_type"]
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.sn_id = cls.share_network['id']
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type)
         cls.share_zone = cls.zones[0]
@@ -61,7 +68,8 @@
     def test_get_share_export_location_for_secondary_replica(self):
         """Is NotFound raised with share el API for non-active replicas"""
         share = self.create_share(share_type_id=self.share_type['id'],
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         replica = self.create_share_replica(share['id'], self.replica_zone)
         replica_exports = (
             self.shares_v2_client.list_share_replica_export_locations(
@@ -80,7 +88,8 @@
         # Create a share type with no support for replication
         share_type = self._create_share_type()
         share = self.create_share(share_type_id=share_type['id'],
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         share_instances = self.admin_client.get_instances_of_share(share['id'])
         for instance in share_instances:
             self.assertRaises(
@@ -102,7 +111,8 @@
     def test_get_replica_export_location_for_invalid_export_id(self):
         """Is NotFound raised for invalid replica export location ID"""
         share = self.create_share(share_type_id=self.share_type['id'],
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         replica = self.create_share_replica(share['id'], self.replica_zone)
         self.assertRaises(
             lib_exc.NotFound,
diff --git a/manila_tempest_tests/tests/api/test_replication_negative.py b/manila_tempest_tests/tests/api/test_replication_negative.py
index 8e20483..fd8bf4f 100644
--- a/manila_tempest_tests/tests/api/test_replication_negative.py
+++ b/manila_tempest_tests/tests/api/test_replication_negative.py
@@ -22,6 +22,7 @@
 from manila_tempest_tests.common import constants
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
 
 CONF = config.CONF
 _MIN_SUPPORTED_MICROVERSION = '2.11'
@@ -37,6 +38,8 @@
         super(ReplicationNegativeTest, cls).resource_setup()
         cls.admin_client = cls.admin_shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -47,7 +50,11 @@
         extra_specs = {"replication_type": cls.replication_type}
         cls.share_type = cls._create_share_type(extra_specs)
         cls.share_type_id = cls.share_type['id']
-
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.sn_id = cls.share_network['id']
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type, client=cls.admin_client)
         cls.share_zone = cls.zones[0]
@@ -57,9 +64,11 @@
         cls.share1, cls.instance_id1 = cls._create_share_get_instance()
 
     @classmethod
-    def _create_share_get_instance(cls):
+    def _create_share_get_instance(cls, share_network_id=None):
+        sn_id = share_network_id if share_network_id else cls.sn_id
         share = cls.create_share(share_type_id=cls.share_type_id,
-                                 availability_zone=cls.share_zone)
+                                 availability_zone=cls.share_zone,
+                                 share_network_id=sn_id)
         share_instances = cls.admin_client.get_instances_of_share(
             share["id"], version=_MIN_SUPPORTED_MICROVERSION
         )
@@ -80,7 +89,8 @@
             data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX),
             extra_specs=self.add_extra_specs_to_dict(),
             client=self.admin_client)["share_type"]
-        share = self.create_share(share_type_id=share_type["id"])
+        share = self.create_share(share_type_id=share_type["id"],
+                                  share_network_id=self.sn_id)
         self.assertRaises(lib_exc.BadRequest,
                           self.create_share_replica,
                           share['id'],
@@ -207,6 +217,26 @@
                           self.share1['id'],
                           self.replica_zone)
 
+    @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+    @testtools.skipIf(
+        not CONF.share.multitenancy_enabled, "Only for multitenancy.")
+    @base.skip_if_microversion_lt("2.51")
+    def test_try_add_replica_nonexistent_subnet(self):
+        # Create a new share network only for a specific az
+        data = self.generate_share_network_data()
+        subnet = utils.share_network_get_default_subnet(self.share_network)
+        data['neutron_net_id'] = subnet['neutron_net_id']
+        data['neutron_subnet_id'] = subnet['neutron_subnet_id']
+        data['availability_zone'] = self.share_zone
+        share_net = self.shares_v2_client.create_share_network(**data)
+        share, instance_id = self._create_share_get_instance(
+            share_network_id=share_net['id'])
+
+        self.assertRaises(lib_exc.BadRequest,
+                          self.create_share_replica,
+                          share['id'],
+                          self.replica_zone)
+
 
 @testtools.skipUnless(CONF.share.run_replication_tests,
                       'Replication tests are disabled.')
diff --git a/manila_tempest_tests/tests/api/test_replication_snapshots.py b/manila_tempest_tests/tests/api/test_replication_snapshots.py
index e1902f7..40bf365 100644
--- a/manila_tempest_tests/tests/api/test_replication_snapshots.py
+++ b/manila_tempest_tests/tests/api/test_replication_snapshots.py
@@ -20,6 +20,7 @@
 from manila_tempest_tests.common import constants
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
 
 CONF = config.CONF
 _MIN_SUPPORTED_MICROVERSION = '2.11'
@@ -37,6 +38,8 @@
         super(ReplicationSnapshotTest, cls).resource_setup()
         cls.admin_client = cls.admin_shares_v2_client
         cls.replication_type = CONF.share.backend_replication_type
+        cls.multitenancy_enabled = (
+            utils.replication_with_multitenancy_support())
 
         if cls.replication_type not in constants.REPLICATION_TYPE_CHOICES:
             raise share_exceptions.ShareReplicationTypeException(
@@ -47,6 +50,11 @@
         extra_specs = {"replication_type": cls.replication_type}
         cls.share_type = cls._create_share_type(extra_specs)
         cls.share_type_id = cls.share_type['id']
+        cls.sn_id = None
+        if cls.multitenancy_enabled:
+            cls.share_network = cls.shares_v2_client.get_share_network(
+                cls.shares_v2_client.share_network_id)
+            cls.sn_id = cls.share_network['id']
 
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type, client=cls.admin_client)
@@ -62,7 +70,8 @@
         creating a share from that snapshot.
         """
         share = self.create_share(share_type_id=self.share_type_id,
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         original_replica = self.shares_v2_client.list_share_replicas(
             share["id"])[0]
 
@@ -83,7 +92,8 @@
 
         if CONF.share.capability_create_share_from_snapshot_support:
             self.create_share(share_type_id=self.share_type_id,
-                              snapshot_id=snapshot['id'])
+                              snapshot_id=snapshot['id'],
+                              share_network_id=self.sn_id)
 
     @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
     def test_snapshot_before_share_replica(self):
@@ -94,7 +104,8 @@
         Verify snapshot by creating share from the snapshot.
         """
         share = self.create_share(share_type_id=self.share_type_id,
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         snapshot = self.create_snapshot_wait_for_active(share["id"])
 
         original_replica = self.shares_v2_client.list_share_replicas(
@@ -119,7 +130,8 @@
 
         if CONF.share.capability_create_share_from_snapshot_support:
             self.create_share(share_type_id=self.share_type_id,
-                              snapshot_id=snapshot['id'])
+                              snapshot_id=snapshot['id'],
+                              share_network_id=self.sn_id)
 
     @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
     def test_snapshot_before_and_after_share_replica(self):
@@ -130,7 +142,8 @@
         Verify snapshots by creating share from the snapshots.
         """
         share = self.create_share(share_type_id=self.share_type_id,
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         snapshot1 = self.create_snapshot_wait_for_active(share["id"])
 
         original_replica = self.shares_v2_client.list_share_replicas(
@@ -163,9 +176,11 @@
 
         if CONF.share.capability_create_share_from_snapshot_support:
             self.create_share(share_type_id=self.share_type_id,
-                              snapshot_id=snapshot1['id'])
+                              snapshot_id=snapshot1['id'],
+                              share_network_id=self.sn_id)
             self.create_share(share_type_id=self.share_type_id,
-                              snapshot_id=snapshot2['id'])
+                              snapshot_id=snapshot2['id'],
+                              share_network_id=self.sn_id)
 
     @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
     def test_delete_snapshot_after_adding_replica(self):
@@ -176,7 +191,8 @@
         """
 
         share = self.create_share(share_type_id=self.share_type_id,
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         share_replica = self.create_share_replica(share["id"],
                                                   self.replica_zone)
         self.shares_v2_client.wait_for_share_replica_status(
@@ -195,10 +211,12 @@
         """Test replica for a share that was created from snapshot."""
 
         share = self.create_share(share_type_id=self.share_type_id,
-                                  availability_zone=self.share_zone)
+                                  availability_zone=self.share_zone,
+                                  share_network_id=self.sn_id)
         orig_snapshot = self.create_snapshot_wait_for_active(share["id"])
         snap_share = self.create_share(share_type_id=self.share_type_id,
-                                       snapshot_id=orig_snapshot['id'])
+                                       snapshot_id=orig_snapshot['id'],
+                                       share_network_id=self.sn_id)
         original_replica = self.shares_v2_client.list_share_replicas(
             snap_share["id"])[0]
         share_replica = self.create_share_replica(snap_share["id"],
diff --git a/manila_tempest_tests/tests/api/test_revert_to_snapshot.py b/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
index c4b72a0..c862c0b 100644
--- a/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
+++ b/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
@@ -22,6 +22,7 @@
 from manila_tempest_tests.common import constants
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
 
 CONF = config.CONF
 
@@ -48,6 +49,8 @@
     def resource_setup(cls):
         super(RevertToSnapshotTest, cls).resource_setup()
         cls.admin_client = cls.admin_shares_v2_client
+        cls.replication_multitenancy = (
+            utils.replication_with_multitenancy_support())
         pools = cls.admin_client.list_pools(detail=True)['pools']
         revert_support = [
             pool['capabilities'][constants.REVERT_TO_SNAPSHOT_SUPPORT]
@@ -91,6 +94,11 @@
                 cls.replicated_share_type, client=cls.admin_client)
             cls.share_zone = cls.zones[0]
             cls.replica_zone = cls.zones[-1]
+            cls.sn_id = None
+            if cls.replication_multitenancy:
+                cls.share_network = cls.shares_v2_client.get_share_network(
+                    cls.shares_v2_client.share_network_id)
+                cls.sn_id = cls.share_network['id']
 
     @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
     @ddt.data(
@@ -139,7 +147,8 @@
         """Test reverting to a replicated snapshot."""
         share = self.create_share(
             share_type_id=self.replicated_share_type['id'],
-            availability_zone=self.share_zone
+            availability_zone=self.share_zone,
+            share_network_id=self.sn_id
         )
 
         share_replica = self.create_share_replica(share["id"],
diff --git a/manila_tempest_tests/utils.py b/manila_tempest_tests/utils.py
index c2c7ec6..3d5cf25 100644
--- a/manila_tempest_tests/utils.py
+++ b/manila_tempest_tests/utils.py
@@ -170,6 +170,11 @@
     return extra_specs
 
 
+def replication_with_multitenancy_support():
+    return (share_network_subnets_are_supported() and
+            CONF.share.multitenancy_enabled)
+
+
 def skip_if_manage_not_supported_for_version(
         version=CONF.share.max_api_microversion):
     if (is_microversion_lt(version, "2.49")
