diff --git a/azure-toolkit-libs/azure-toolkit-cosmos-lib/src/main/java/com/microsoft/azure/toolkit/lib/cosmos/model/DatabaseAccountKind.java b/azure-toolkit-libs/azure-toolkit-cosmos-lib/src/main/java/com/microsoft/azure/toolkit/lib/cosmos/model/DatabaseAccountKind.java
index <HASH>..<HASH> 100644
--- a/azure-toolkit-libs/azure-toolkit-cosmos-lib/src/main/java/com/microsoft/azure/toolkit/lib/cosmos/model/DatabaseAccountKind.java
+++ b/azure-toolkit-libs/azure-toolkit-cosmos-lib/src/main/java/com/microsoft/azure/toolkit/lib/cosmos/model/DatabaseAccountKind.java
@@ -34,7 +34,7 @@ public class DatabaseAccountKind {
     public static DatabaseAccountKind fromString(String input) {
         return values().stream()
                 .filter(logLevel -> StringUtils.equalsIgnoreCase(input, logLevel.getValue()))
-                .findFirst().orElse(null);
+                .findFirst().orElseGet(() -> new DatabaseAccountKind(input));
     }
 
     public static DatabaseAccountKind fromAccount(@Nonnull CosmosDBAccount account) {
Fix issue parse cosmos account kind