diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenStackEndPointCompleter.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenStackEndPointCompleter.java
index 26aa5be..cf2901c 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenStackEndPointCompleter.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenStackEndPointCompleter.java
@@ -27,15 +27,21 @@
  */
 public class OpenStackEndPointCompleter implements Completer {
 
-    private static final String OPENSTACK_ENDPOINT_EXAMPLE =
+    private static final String OPENSTACK_ENDPOINT_EXAMPLE_V2 =
             "http://IP address of OpenStack end point:35357/v2.0 ProjectName ID Password";
+    private static final String OPENSTACK_ENDPOINT_EXAMPLE_V3 =
+            "http://IP address of OpenStack end point/identity/v3 ProjectName ID Password";
+    private static final String SEPARATOR = "\n or \n";
+
     @Override
     public int complete(String buffer, int cursor, List<String> candidates) {
         StringsCompleter delegate = new StringsCompleter();
 
         SortedSet<String> strings = delegate.getStrings();
 
-        strings.add(OPENSTACK_ENDPOINT_EXAMPLE);
+        strings.add(OPENSTACK_ENDPOINT_EXAMPLE_V2);
+        strings.add(SEPARATOR);
+        strings.add(OPENSTACK_ENDPOINT_EXAMPLE_V3);
 
         return delegate.complete(buffer, cursor, candidates);
     }
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenstackSyncStateCommand.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenstackSyncStateCommand.java
index b9b96de..c311889 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenstackSyncStateCommand.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/cli/OpenstackSyncStateCommand.java
@@ -78,20 +78,43 @@
     private static final String DEVICE_OWNER_GW = "network:router_gateway";
     private static final String DEVICE_OWNER_IFACE = "network:router_interface";
 
+    private static final String KEYSTONE_V2 = "v2.0";
+    private static final String KEYSTONE_V3 = "v3";
+
     @Override
     protected void execute() {
         OpenstackSecurityGroupAdminService osSgAdminService = get(OpenstackSecurityGroupAdminService.class);
         OpenstackNetworkAdminService osNetAdminService = get(OpenstackNetworkAdminService.class);
         OpenstackRouterAdminService osRouterAdminService = get(OpenstackRouterAdminService.class);
 
-        OSClient.OSClientV3 osClient;
-        try {
-            osClient = OSFactory.builderV3()
-                    .endpoint(this.endpoint)
-                    .credentials(this.user, this.password, Identifier.byName(DOMAIN_DEFUALT))
-                    .scopeToProject(Identifier.byName(this.tenant), Identifier.byName(DOMAIN_DEFUALT))
-                    .authenticate();
+        OSClient osClient;
 
+        try {
+            if (endpoint != null) {
+                if (endpoint.contains(KEYSTONE_V2)) {
+                    osClient = OSFactory.builderV2()
+                            .endpoint(this.endpoint)
+                            .tenantName(this.tenant)
+                            .credentials(this.user, this.password)
+                            .authenticate();
+                } else if (endpoint.contains(KEYSTONE_V3)) {
+
+                    Identifier project = Identifier.byName(this.tenant);
+                    Identifier domain = Identifier.byName(DOMAIN_DEFUALT);
+
+                    osClient = OSFactory.builderV3()
+                            .endpoint(this.endpoint)
+                            .credentials(this.user, this.password, domain)
+                            .scopeToProject(project, domain)
+                            .authenticate();
+                } else {
+                    print("Unrecognized keystone version type");
+                    return;
+                }
+            } else {
+                print("Need to specify a valid endpoint");
+                return;
+            }
         } catch (AuthenticationException e) {
             print("Authentication failed");
             return;
