diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/Controllers/OrganizationsController.cs index e85f05343e..4434821c09 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/Controllers/OrganizationsController.cs @@ -388,7 +388,7 @@ namespace Bit.Api.Controllers if (ssoConfig?.GetData()?.KeyConnectorEnabled == true && _currentContext.User.UsesKeyConnector) { - throw new BadRequestException("You cannot leave this Organization because you are using its Key Connector."); + throw new BadRequestException("Your organization's Single Sign-On settings prevent you from leaving."); } var userId = _userService.GetProperUserId(User); diff --git a/test/Api.Test/Controllers/OrganizationsControllerTests.cs b/test/Api.Test/Controllers/OrganizationsControllerTests.cs index 6b69a7e971..480e475531 100644 --- a/test/Api.Test/Controllers/OrganizationsControllerTests.cs +++ b/test/Api.Test/Controllers/OrganizationsControllerTests.cs @@ -78,7 +78,7 @@ namespace Bit.Api.Test.Controllers var exception = await Assert.ThrowsAsync( () => _sut.Leave(orgId.ToString())); - Assert.Contains("You cannot leave this Organization because you are using its Key Connector.", + Assert.Contains("Your organization's Single Sign-On settings prevent you from leaving.", exception.Message); await _organizationService.DidNotReceiveWithAnyArgs().DeleteUserAsync(default, default);