diff --git a/src/Core/AdminConsole/OrganizationFeatures/Organizations/Interfaces/IOrganizationUpdateKeysCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/Organizations/Interfaces/IOrganizationUpdateKeysCommand.cs
new file mode 100644
index 0000000000..2d01a5e4e3
--- /dev/null
+++ b/src/Core/AdminConsole/OrganizationFeatures/Organizations/Interfaces/IOrganizationUpdateKeysCommand.cs
@@ -0,0 +1,13 @@
+using Bit.Core.AdminConsole.Entities;
+
+public interface IOrganizationUpdateKeysCommand
+{
+ ///
+ /// Update the keys for an organization.
+ ///
+ /// The ID of the organization to update.
+ /// The public key for the organization.
+ /// The private key for the organization.
+ /// The updated organization.
+ Task UpdateOrganizationKeysAsync(Guid orgId, string publicKey, string privateKey);
+}
diff --git a/src/Core/AdminConsole/OrganizationFeatures/Organizations/OrganizationUpdateKeysCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/Organizations/OrganizationUpdateKeysCommand.cs
new file mode 100644
index 0000000000..aa85c7e2a4
--- /dev/null
+++ b/src/Core/AdminConsole/OrganizationFeatures/Organizations/OrganizationUpdateKeysCommand.cs
@@ -0,0 +1,47 @@
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Context;
+using Bit.Core.Exceptions;
+using Bit.Core.Repositories;
+using Bit.Core.Services;
+
+public class OrganizationUpdateKeysCommand : IOrganizationUpdateKeysCommand
+{
+ private readonly ICurrentContext _currentContext;
+ private readonly IOrganizationRepository _organizationRepository;
+ private readonly IOrganizationService _organizationService;
+
+ public const string OrganizationKeysAlreadyExistErrorMessage = "Organization Keys already exist.";
+
+ public OrganizationUpdateKeysCommand(
+ ICurrentContext currentContext,
+ IOrganizationRepository organizationRepository,
+ IOrganizationService organizationService)
+ {
+ _currentContext = currentContext;
+ _organizationRepository = organizationRepository;
+ _organizationService = organizationService;
+ }
+
+ public async Task UpdateOrganizationKeysAsync(Guid organizationId, string publicKey, string privateKey)
+ {
+ if (!await _currentContext.ManageResetPassword(organizationId))
+ {
+ throw new UnauthorizedAccessException();
+ }
+
+ // If the keys already exist, error out
+ var organization = await _organizationRepository.GetByIdAsync(organizationId);
+ if (organization.PublicKey != null && organization.PrivateKey != null)
+ {
+ throw new BadRequestException(OrganizationKeysAlreadyExistErrorMessage);
+ }
+
+ // Update org with generated public/private key
+ organization.PublicKey = publicKey;
+ organization.PrivateKey = privateKey;
+
+ await _organizationService.UpdateAsync(organization);
+
+ return organization;
+ }
+}