diff --git a/vendor/magento/module-admin-gws/Observer/RolePermissionAssigner.php b/vendor/magento/module-admin-gws/Observer/RolePermissionAssigner.php
index ecb36760548..9f1379ef151 100644
--- a/vendor/magento/module-admin-gws/Observer/RolePermissionAssigner.php
+++ b/vendor/magento/module-admin-gws/Observer/RolePermissionAssigner.php
@@ -115,7 +115,7 @@ class RolePermissionAssigner
             if (empty($storeGroupIds) && count($object->getGwsWebsites())) {
                 foreach ($storeGroupCollection as $storeGroup) {
                     if (in_array($storeGroup->getWebsiteId(), $object->getGwsWebsites())) {
-                        $storeGroupIds[] = $storeGroup->getId();
+                        $storeGroupIds[] = (int)$storeGroup->getId();
                     }
                 }
             }
@@ -126,7 +126,7 @@ class RolePermissionAssigner
         $storeIds = [];
         foreach ($this->storeManager->getStores() as $store) {
             if (in_array($store->getGroupId(), $object->getGwsStoreGroups())) {
-                $storeIds[] = $store->getId();
+                $storeIds[] = (int)$store->getId();
             }
         }
         $object->setGwsStores($storeIds);
@@ -135,7 +135,7 @@ class RolePermissionAssigner
         $relevantWebsites = [];
         foreach ($storeGroupCollection as $storeGroup) {
             if (in_array($storeGroup->getId(), $object->getGwsStoreGroups())) {
-                $relevantWebsites[] = $storeGroup->getWebsite()->getId();
+                $relevantWebsites[] = (int)$storeGroup->getWebsite()->getId();
             }
         }
         $object->setGwsRelevantWebsites(array_values(array_unique($relevantWebsites)));
