diff --git a/vendor/magento/module-company-graph-ql/Model/Resolver/Customer/CustomerId.php b/vendor/magento/module-company-graph-ql/Model/Resolver/Customer/CustomerId.php
new file mode 100644
index 00000000000..b6ee17bf2e4
--- /dev/null
+++ b/vendor/magento/module-company-graph-ql/Model/Resolver/Customer/CustomerId.php
@@ -0,0 +1,72 @@
+resolverAccess->isAllowed($this->allowedResources);
+ } catch (\Exception $e) {
+ // If user is not company user, then return null
+ return null;
+ }
+
+ if ($field->getName() === 'id') {
+ $customerId = $value['model']->getId();
+ return $customerId ? $this->uidEncoder->encode((string)$customerId) : null;
+ }
+ return null;
+ }
+}
diff --git a/vendor/magento/module-company-graph-ql/etc/graphql/di.xml b/vendor/magento/module-company-graph-ql/etc/graphql/di.xml
index 89a4774ea70..9fd47ca9853 100644
--- a/vendor/magento/module-company-graph-ql/etc/graphql/di.xml
+++ b/vendor/magento/module-company-graph-ql/etc/graphql/di.xml
@@ -170,6 +170,13 @@
CompaniesSorting
+
+
+
+ - Magento_Company::users_view
+
+
+
diff --git a/vendor/magento/module-company-graph-ql/etc/schema.graphqls b/vendor/magento/module-company-graph-ql/etc/schema.graphqls
index 07365409ca8..2d1318b79c1 100644
--- a/vendor/magento/module-company-graph-ql/etc/schema.graphqls
+++ b/vendor/magento/module-company-graph-ql/etc/schema.graphqls
@@ -325,6 +325,7 @@ type Customer {
status: CompanyUserStatusEnum @resolver(class: "Magento\\CompanyGraphQl\\Model\\Resolver\\Company\\Customer\\Customer") @doc(description: "Indicates whether the company user is ACTIVE or INACTIVE.")
structure_id: ID! @resolver(class: "Magento\\CompanyGraphQl\\Model\\Resolver\\Company\\Customer\\StructureId") @doc(description: "ID of the company structure")
companies(input: UserCompaniesInput): UserCompaniesOutput! @doc(description: "An object that contains a list of companies user is assigned to.") @resolver(class:"Magento\\CompanyGraphQl\\Model\\Resolver\\Customer\\Companies")
+ id: ID @resolver(class: "Magento\\CompanyGraphQl\\Model\\Resolver\\Customer\\CustomerId") @doc(description: "The ID assigned to the customer.")
}
input UserCompaniesInput @doc(description: "Defines the input for returning matching companies the customer is assigned to.") {