Repository: gravitee-io/graviteeio-access-management
Pull request #967 (2020-11-17 22:22:15)

fix(users): use the same validator for both displayName and username
fixes gravitee-io/issues#4623


Patch:
diff --git a/gravitee-am-service/src/main/java/io/gravitee/am/service/validators/UserValidator.java b/gravitee-am-service/src/main/java/io/gravitee/am/service/validators/UserValidator.java
index db5658f605..b5b080e739 100644
--- a/gravitee-am-service/src/main/java/io/gravitee/am/service/validators/UserValidator.java
+++ b/gravitee-am-service/src/main/java/io/gravitee/am/service/validators/UserValidator.java
@@ -35,7 +35,7 @@ public class UserValidator {
 
     public static final int DEFAULT_MAX_LENGTH = 100;
     public static final String NAME_STRICT_PATTERN = "^[^±!@£$%^&*_+§¡€#¢¶•ªº«»\\\\/<>?:;|=.,]{0," + DEFAULT_MAX_LENGTH + "}$";
-    public static final String NAME_LAX_PATTERN = "^[^±!@£$%^&*_+§¡€#¢¶•ªº«»\\\\/<>?|=]{0," + DEFAULT_MAX_LENGTH + "}$";
+    public static final String NAME_LAX_PATTERN = "^[^±!£$%^&*§¡€¢¶•ªº«»\\\\/<>?|=]{0," + DEFAULT_MAX_LENGTH + "}$";
     public static final String USERNAME_PATTERN = "^[^±!£$%^&*§¡€¢¶•ªº«»\\\\/<>?:;|=,]{1," + DEFAULT_MAX_LENGTH + "}$";
 
     private static final Pattern NAME_STRICT_PATTERN_COMPILED = Pattern.compile(NAME_STRICT_PATTERN);
diff --git a/postman/collections/graviteeio-am-user-management-collection-app-version.json b/postman/collections/graviteeio-am-user-management-collection-app-version.json
index de547e5de4..2ac9dfd07f 100644
--- a/postman/collections/graviteeio-am-user-management-collection-app-version.json
+++ b/postman/collections/graviteeio-am-user-management-collection-app-version.json
@@ -1,6 +1,6 @@
 {
 	"info": {
-		"_postman_id": "1db11782-8b56-4abc-b98e-80c9823f233a",
+		"_postman_id": "88f51f73-0d98-488f-95de-437fb5e04713",
 		"name": "Gravitee.io - AM - User Management - app version",
 		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
 	},
@@ -14,7 +14,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "571e9b59-b9e7-452c-9469-9786ded290a6",
+								"id": "604aa2f6-4a2e-4497-abad-0614f459bf37",
 								"exec": [
 									"",
 									"pm.test(\"Status code is 200\", function () {",
@@ -76,7 +76,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "b286f0fa-cfcc-45b9-863a-1dbc87fdf835",
+								"id": "dde5b4a7-41eb-4f7a-9e04-171def256950",
 								"exec": [
 									"pm.test(\"Status code is 201\", function () {",
 									"    pm.response.to.have.status(201);",
@@ -129,7 +129,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "bfe78ac1-144a-4bbd-abf9-55e160e723bf",
+								"id": "5f46cd26-62ee-483a-add7-1d94f8f08519",
 								"exec": [
 									"// wait for sync process",
 									"setTimeout(function(){}, 10000);"
@@ -178,7 +178,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "5332b6f5-7419-4792-a30f-cce968d3d67e",
+								"id": "a442b1a0-bd45-48be-a213-467b940b5f2d",
 								"exec": [
 									"pm.test(\"Status code is 200\", function () {",
 									"    pm.response.to.have.status(200);",
@@ -232,7 +232,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "085d9581-1a81-40f3-9942-53fc318d8e52",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -286,7 +286,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "fd7dd470-81c2-4463-a3a0-a5ee72489904",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -345,7 +345,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "4818a18f-6c8e-4d0b-812a-376739cd28c3",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -409,7 +409,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "33e83c11-54f8-4060-b207-5b00304f9e8f",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -473,7 +473,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "d398f6c0-ada2-4f41-8b32-f0e9d9059f37",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -539,7 +539,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "b134c416-976a-467e-bfbf-fba6f960e31e",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -599,7 +599,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "31529131-821c-4dac-9c40-dadd696155ee",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -648,7 +648,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "c6e2e30c-6abd-491f-9ab2-1d5bab30d691",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -709,7 +709,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "edc35b4b-fb34-4924-8531-0333548e5f88",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -777,7 +777,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "294809cd-3eb2-4527-b5f0-5fe8545833fe",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -840,7 +840,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "cd73b77e-1a08-43a7-a9cc-189153058087",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -894,7 +894,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "71d78d65-ea31-4138-a047-396643b806c1",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -953,7 +953,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "54d19dba-9a17-4e4e-8ecd-598d3e3409ea",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1012,7 +1012,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "2e9ccd35-a326-4e98-aa8b-0f538659f412",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1071,7 +1071,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "fc01b3ae-20ee-47d2-bce0-f2f52c142b81",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1079,7 +1079,7 @@
 													"",
 													"pm.test(\"UM - create user - username invalid\", function () {",
 													"    var jsonData = pm.response.json();",
-													"    pm.expect(jsonData.message).to.eql(\"[#Invalid: invalid username]\");",
+													"    pm.expect(jsonData.message).to.eql(\"[#Invalid&: invalid username]\");",
 													"});"
 												],
 												"type": "text/javascript"
@@ -1103,7 +1103,7 @@
 										],
 										"body": {
 											"mode": "raw",
-											"raw": "{\n\t\"firstName\": \"Jensen\",\n\t\"lastName\": \"Barbara\",\n\t\"username\": \"#Invalid\",\n\t\"email\": \"jensen.barbara@mail.com\",\n\t\"password\": \"#CoMpL3X-P@SsW0Rd\"\n}"
+											"raw": "{\n\t\"firstName\": \"Jensen\",\n\t\"lastName\": \"Barbara\",\n\t\"username\": \"#Invalid&\",\n\t\"email\": \"jensen.barbara@mail.com\",\n\t\"password\": \"#CoMpL3X-P@SsW0Rd\"\n}"
 										},
 										"url": {
 											"raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/{{domain}}/users",
@@ -1130,7 +1130,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "6dadbac9-a81d-4c45-85d2-8bb2150622c1",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1189,7 +1189,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "6b2cb7be-9c55-4687-b000-531dcf08f072",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1248,7 +1248,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "7f1822f4-5c04-46b6-b466-0a6bbd7f6d53",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1307,7 +1307,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "759b9a9e-1a22-45c3-825d-bf2d435646a5",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1366,7 +1366,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "eb19b2a2-760e-444e-9bcd-6fe3e412939c",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1425,7 +1425,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "e6fca8f3-d661-4b91-8963-03d59aae86ef",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1484,7 +1484,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "edbc936c-e14b-494a-b0c1-49d9eb8b3f84",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -1551,7 +1551,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "47768a57-fac7-4c17-8265-bbeee5fd3c29",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1610,7 +1610,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "ea1cd4ea-fc9f-4585-9b49-132a3624ddac",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1676,7 +1676,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "29adabbe-3199-4e82-afb7-851bdd50b1bb",
+												"id": "91182bb8-1f11-4cbe-a437-e42140e6c98b",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -1733,7 +1733,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "15abc734-b4ba-4027-96c6-47f69ca0f01b",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -1804,7 +1804,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "fb56a849-b090-4e80-9c8c-eca9f4d72e85",
+												"id": "a0ad4f4b-2f90-4ef4-b24d-0f67eb37ab55",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -1822,7 +1822,7 @@
 										{
 											"listen": "prerequest",
 											"script": {
-												"id": "904f0113-b2b9-4645-9511-48bb10791506",
+												"id": "93cca7de-218d-4f13-9166-41fc3cf679b8",
 												"exec": [
 													""
 												],
@@ -1854,7 +1854,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "3a44e8a8-5bcf-4560-a0fc-567473ad2502",
 												"exec": [
 													"pm.test(\"Status code is 204\", function () {",
 													"    pm.response.to.have.status(204);",
@@ -1910,7 +1910,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "c89add53-264c-4aee-a11d-55ca0b405fd6",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -1970,7 +1970,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "c759008a-b190-4de6-bdc7-5a2ccf5bc267",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2019,7 +2019,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "f9457c5c-a41c-4940-8172-85a634091228",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2079,7 +2079,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "01b10746-6485-4eab-ac0d-28a2fedf4973",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2139,7 +2139,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "de66d85a-5f31-4f82-87fd-976dd37c4fe9",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2199,7 +2199,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "1f260b85-bd74-439f-b326-96585d0649ae",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2259,7 +2259,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "ccd7a79f-b9e3-4e4a-ab8c-7689965b437f",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2319,7 +2319,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "5e7740ce-11fd-41fd-a1fb-21fccbd19963",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -2386,7 +2386,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "3f1a6677-6c13-4a0b-878b-50380107d647",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -2444,7 +2444,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "c95cbe4f-ae67-4698-8dfc-15b3efe48f7a",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -2500,7 +2500,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "3241954a-e55d-4ac5-86c9-9df4531f148b",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -2576,7 +2576,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "244ac6f3-4aa6-4de0-aab6-cf90b4b9b5b4",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2630,7 +2630,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "93c0cfb0-f625-4511-8c39-b70dd805b71a",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2689,7 +2689,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "3a83e251-83fa-49e8-b3e1-374afa2dab9c",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -2750,7 +2750,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "8e7ec10f-c189-4cfc-b43f-ace8d11c6087",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -2811,7 +2811,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "0fee32ae-aeba-499d-8915-a4ce6990d50a",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2877,7 +2877,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "69d21c7d-aea5-4dd5-aa7c-e7e86eaa97ba",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -2937,7 +2937,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "ec4905cf-6254-4db3-84bf-c909484906f2",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2986,7 +2986,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "9a212087-1b3b-4a25-bd18-d67832a7ac75",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3053,7 +3053,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "78acba1b-5fe0-4f7a-bf27-14afec317645",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3113,7 +3113,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "25ca238c-12fb-49da-b4c0-2ad70c468338",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3180,7 +3180,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "14b353e7-1e49-4aad-95ed-a723a0ab25dc",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -3236,7 +3236,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "c65a6b2a-1955-4ecf-bad3-41a4c3f25f44",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3305,7 +3305,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "f7a4d790-7b2d-4090-ba41-0c34b7956e98",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3363,7 +3363,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "1605b4dc-58b4-4a95-a834-c652d271244f",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -3417,7 +3417,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "0ec16ae1-0b1a-4a21-8608-96277894b3d5",
 												"exec": [
 													"pm.test(\"Status code is 204\", function () {",
 													"    pm.response.to.have.status(204);",
@@ -3466,7 +3466,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "edc955ac-5aa9-4b5d-bef8-1d053c3afef0",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3516,7 +3516,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "35f0648e-0920-4673-98f8-09fd3bf1dd72",
+										"id": "c5318841-5174-48ef-9002-10635e2d64ac",
 										"type": "text/javascript",
 										"exec": [
 											""
@@ -3526,7 +3526,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "25349ed5-4030-41bc-a22b-2093961b43f4",
+										"id": "d51aaea5-6aaa-4b28-831c-0e2eafd4de4d",
 										"type": "text/javascript",
 										"exec": [
 											""
@@ -3550,7 +3550,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "d1195033-78b1-481b-acc9-845df5ddae80",
+										"id": "7021ed28-d226-4874-8c47-f65a433ab4f5",
 										"exec": [
 											"pm.test(\"Status code is 201\", function () {",
 											"    pm.response.to.have.status(201);",
@@ -3609,7 +3609,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "c37cba72-91c2-4850-80cd-6fd3908e406e",
+										"id": "1efe945e-a690-40fe-bbcd-670ac6484be7",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -3624,7 +3624,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "b665041c-4138-4807-944d-1e278c44cfcb",
+										"id": "f29c8534-950b-4f19-ba36-074c13b0af83",
 										"exec": [
 											"let domain = pm.environment.get(\"domain\");",
 											"let identityProvider = 'default-idp-'+domain;",
@@ -3683,7 +3683,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "9186a5ce-7ca7-42a1-9df2-37d51a0d5344",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -3701,7 +3701,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "4bc8bf4d-7aa0-4a05-b59a-cbe887985035",
 										"exec": [
 											""
 										],
@@ -3741,8 +3741,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -3762,7 +3762,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "ca9ba9d2-02fc-435b-8999-3923e9bcb783",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -3780,7 +3780,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "4c80a3e9-9173-4788-b778-cacc97d34f4e",
 										"exec": [
 											""
 										],
@@ -3841,7 +3841,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "890a8757-12ab-4941-a394-ad7880c73aa5",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -3860,7 +3860,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "7ef581f2-9d49-4f6f-8db6-ba39e2e17e7d",
 										"exec": [
 											""
 										],
@@ -3900,8 +3900,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -3921,7 +3921,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "b00dc4bf-bdfa-426b-bd54-79234c8ecc84",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -3981,7 +3981,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "ec168dd4-8020-4f4d-81f3-3c0fb71dc190",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -3999,7 +3999,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "c2ccd1e3-0b54-49b6-a3e5-d5bb40413719",
 										"exec": [
 											""
 										],
@@ -4039,8 +4039,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -4060,7 +4060,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "82aa28e7-bef2-4e40-a17b-358a2112e722",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -4120,7 +4120,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "1682e18f-deb5-45d2-ac8b-f39002164eda",
 										"exec": [
 											"pm.test(\"Status code is 204\", function () {",
 											"    pm.response.to.have.status(204);",
@@ -4176,7 +4176,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "9f570bad-04b1-49d4-92ab-73f65cda0cf0",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -4193,7 +4193,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "2ec31bc6-d7c3-402f-bfe3-589aaa0da261",
 										"exec": [
 											""
 										],
@@ -4254,7 +4254,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "e2a04f71-d6c1-4c35-977b-0ce7b1b7813e",
 										"exec": [
 											"pm.test(\"Status code is 404\", function () {",
 											"    pm.response.to.have.status(404);",
@@ -4308,7 +4308,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "28d68c3b-517d-4f67-942a-631076e04ccb",
 										"exec": [
 											"pm.test(\"Status code is 204\", function () {",
 											"    pm.response.to.have.status(204);",
@@ -4357,7 +4357,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "3569183f-340d-4a18-af2a-dbbaae1cce3d",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -4375,7 +4375,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "acba3207-c686-437e-83c0-1afb47fd9ede",
 										"exec": [
 											""
 										],
@@ -4415,8 +4415,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -4443,7 +4443,7 @@
 				{
 					"listen": "test",
 					"script": {
-						"id": "abfa8366-3ee2-45b0-b658-0040b79d565c",
+						"id": "22eab64d-4cd4-4da7-b7a0-65ec8b33679c",
 						"exec": [
 							"pm.test(\"Status code is 204\", function () {",
 							"    pm.response.to.have.status(204);",
diff --git a/postman/collections/graviteeio-am-user-management-collection.json b/postman/collections/graviteeio-am-user-management-collection.json
index a4adc0ff60..ea55030d46 100644
--- a/postman/collections/graviteeio-am-user-management-collection.json
+++ b/postman/collections/graviteeio-am-user-management-collection.json
@@ -1,6 +1,6 @@
 {
 	"info": {
-		"_postman_id": "29325db0-7ab4-4779-8ac0-99176c43fa14",
+		"_postman_id": "601867ab-0e9c-4f7e-85ed-35eeddd0af63",
 		"name": "Gravitee.io - AM - User Management",
 		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
 	},
@@ -14,7 +14,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "571e9b59-b9e7-452c-9469-9786ded290a6",
+								"id": "1ba30e1c-39f0-488a-a7ed-7de2ff45338f",
 								"exec": [
 									"",
 									"pm.test(\"Status code is 200\", function () {",
@@ -76,7 +76,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "b286f0fa-cfcc-45b9-863a-1dbc87fdf835",
+								"id": "18781aac-396f-402a-8e4e-f4dbd25456cf",
 								"exec": [
 									"pm.test(\"Status code is 201\", function () {",
 									"    pm.response.to.have.status(201);",
@@ -129,7 +129,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "bfe78ac1-144a-4bbd-abf9-55e160e723bf",
+								"id": "58a782c0-ee57-41c6-b8c7-2c2bd5104864",
 								"exec": [
 									"// wait for sync process",
 									"setTimeout(function(){}, 10000);"
@@ -178,7 +178,7 @@
 						{
 							"listen": "test",
 							"script": {
-								"id": "5332b6f5-7419-4792-a30f-cce968d3d67e",
+								"id": "45adb688-7625-48a1-b874-c092670410e1",
 								"exec": [
 									"pm.test(\"Status code is 200\", function () {",
 									"    pm.response.to.have.status(200);",
@@ -232,7 +232,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "f2692073-780f-4d3a-9bb1-f759e11d4de0",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -286,7 +286,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "ad879aa9-2e99-460f-9ab6-dbcf89e44139",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -345,7 +345,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "446def1c-9383-426d-ae44-13c191955a43",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -409,7 +409,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "866b172a-9091-4ec9-bcf1-52daaa96eed9",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -473,7 +473,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "28259641-5581-4b42-8cfe-8b8bbbc6a12a",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -539,7 +539,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "fa97bdf9-2ed4-40a1-bbea-50281f591c72",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -599,7 +599,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "47c25df1-8af1-4d4b-b55b-56c896f2afad",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -648,7 +648,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "b3b402ae-ae4e-4741-84e1-5b40a2bbab5a",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -709,7 +709,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "c5b33786-b4dd-4de0-8bfe-40108b213030",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -777,7 +777,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "4fd174a9-2193-49cf-8eeb-a05913346929",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -840,7 +840,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "45d41d87-3d1d-492e-8447-99501a4c1bfb",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -894,7 +894,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "dc93108b-2585-4fac-a993-57cca33f02f6",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -953,7 +953,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "960135cd-3d18-49fb-9e55-8b10d6a2160c",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1012,7 +1012,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "9f8f3561-ef6e-4f5d-9067-74f2f441aec1",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1071,7 +1071,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "39860056-195c-45a3-a49a-8db85dc610f4",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1079,7 +1079,7 @@
 													"",
 													"pm.test(\"UM - create user - username invalid\", function () {",
 													"    var jsonData = pm.response.json();",
-													"    pm.expect(jsonData.message).to.eql(\"[#Invalid: invalid username]\");",
+													"    pm.expect(jsonData.message).to.eql(\"[#Invalid&: invalid username]\");",
 													"});"
 												],
 												"type": "text/javascript"
@@ -1103,7 +1103,7 @@
 										],
 										"body": {
 											"mode": "raw",
-											"raw": "{\n\t\"firstName\": \"Jensen\",\n\t\"lastName\": \"Barbara\",\n\t\"username\": \"#Invalid\",\n\t\"email\": \"jensen.barbara@mail.com\",\n\t\"password\": \"#CoMpL3X-P@SsW0Rd\"\n}"
+											"raw": "{\n\t\"firstName\": \"Jensen\",\n\t\"lastName\": \"Barbara\",\n\t\"username\": \"#Invalid&\",\n\t\"email\": \"jensen.barbara@mail.com\",\n\t\"password\": \"#CoMpL3X-P@SsW0Rd\"\n}"
 										},
 										"url": {
 											"raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/{{domain}}/users",
@@ -1130,7 +1130,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "04a0bfcc-5079-4981-abbb-e77d80e5d6e1",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1189,7 +1189,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "07ab31df-65da-4143-b7aa-8bbc5a924fbb",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1248,7 +1248,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "1af7725d-0616-4244-97ea-a25fe1e71d18",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1307,7 +1307,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "aa1312ff-039a-4706-909a-b3cd60e4c03a",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1366,7 +1366,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "d64f4958-5114-454b-a9df-af8f80f92c42",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1425,7 +1425,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "5f0b221d-5ad7-4eee-8dab-ed6886d60514",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1484,7 +1484,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "f0582e03-645e-49a2-8614-10868d31f656",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -1553,7 +1553,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "c5d39e22-8eab-4a3b-99e4-808511a55eb0",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1612,7 +1612,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "cd6c406a-f8e9-43ef-bfdc-30177ed8ff7d",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -1678,7 +1678,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "29adabbe-3199-4e82-afb7-851bdd50b1bb",
+												"id": "e8f449a6-862d-4377-84e1-4a9b2a4dff1e",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -1735,7 +1735,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "852134f1-0edd-4394-8f24-1ade1a3d7bf0",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -1806,7 +1806,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "fb56a849-b090-4e80-9c8c-eca9f4d72e85",
+												"id": "c086d0d6-ce34-4871-9001-a0d4ba4895b7",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -1824,7 +1824,7 @@
 										{
 											"listen": "prerequest",
 											"script": {
-												"id": "904f0113-b2b9-4645-9511-48bb10791506",
+												"id": "39d68dd6-32e6-4ff3-8918-84347b875bd8",
 												"exec": [
 													""
 												],
@@ -1856,7 +1856,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "51577dbf-f0f4-45ed-8f72-78e46a8237b7",
 												"exec": [
 													"pm.test(\"Status code is 204\", function () {",
 													"    pm.response.to.have.status(204);",
@@ -1912,7 +1912,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "338648b6-a79e-4ceb-a24f-c6e0f715e509",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -1972,7 +1972,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "289ea56e-2e5a-4aaa-bbff-02f9066c950d",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2021,7 +2021,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "6c00e2b0-08b9-4996-aea9-189b16ea1bd0",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2081,7 +2081,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "fcd48b6c-580f-4ebd-ac68-028502983ffd",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2141,7 +2141,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "a30dae41-8e7c-4e57-aa83-4ee0ed998824",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2201,7 +2201,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "300b309e-57dd-47bf-be74-625b0ceb1d56",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2261,7 +2261,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "21b1c441-9294-4bc9-a665-a47d2bc5bf7c",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2321,7 +2321,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "2e7ef380-9f47-4dea-af85-f70cdc19c566",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -2388,7 +2388,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "63faa888-431c-44a7-9989-3541152ee39f",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -2446,7 +2446,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "4ee4f63f-76b9-4b55-8775-ae8fba272360",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -2502,7 +2502,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "3319ca80-40f8-421f-9b0f-d8dde1d45c43",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -2578,7 +2578,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "6ca1bc2f-4e44-4615-be59-7eb5a9f7a7f6",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2632,7 +2632,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "09806e98-30a1-49fa-b90a-b5ae28d68e36",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2691,7 +2691,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "e04ec9cb-4f0d-46fa-beee-b55d4f0769b0",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -2752,7 +2752,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "8849fd06-f516-409b-808d-77459e4b0b93",
 												"exec": [
 													"pm.test(\"Status code is 201\", function () {",
 													"    pm.response.to.have.status(201);",
@@ -2813,7 +2813,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ac86c3c9-c0a7-4616-b7cf-6847a7f48801",
+												"id": "ef4624d6-d1be-4e69-acd4-ecdb7fa326bc",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2879,7 +2879,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "10a3b7ba-7c0c-44c6-a8c8-538ad88acca7",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -2939,7 +2939,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "ece85d1d-5e7d-4497-95ee-423ab47a25f2",
 												"exec": [
 													"pm.test(\"Status code is 400\", function () {",
 													"    pm.response.to.have.status(400);",
@@ -2988,7 +2988,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "4e9c717c-9e82-4c89-a01b-8f846bc94e45",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3055,7 +3055,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "4138fd66-66b5-4e64-a13b-7616ba791180",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3115,7 +3115,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "098ca63e-4cbc-4ad1-884d-e6a94f19fffd",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3182,7 +3182,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "8bfb6661-4973-4c0c-bc45-1cc4daeff23c",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -3238,7 +3238,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "29934ca0-8e84-458d-80e7-649d6c5fa21f",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3307,7 +3307,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "be022a48-2b6c-4055-9ac9-ac07537de41a",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3365,7 +3365,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "8ccf6572-7097-460a-8bcf-ef76a9fedd3d",
 												"exec": [
 													"pm.test(\"Status code is 404\", function () {",
 													"    pm.response.to.have.status(404);",
@@ -3419,7 +3419,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+												"id": "a25032bd-770d-4491-a764-48d3822bda12",
 												"exec": [
 													"pm.test(\"Status code is 204\", function () {",
 													"    pm.response.to.have.status(204);",
@@ -3468,7 +3468,7 @@
 										{
 											"listen": "test",
 											"script": {
-												"id": "ace28d5f-a975-4430-ba47-29184cf01460",
+												"id": "44fbea60-d974-471a-88f6-2e206d90b5f8",
 												"exec": [
 													"pm.test(\"Status code is 200\", function () {",
 													"    pm.response.to.have.status(200);",
@@ -3518,7 +3518,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "35f0648e-0920-4673-98f8-09fd3bf1dd72",
+										"id": "50580795-04dc-43e7-8f35-495199a14945",
 										"type": "text/javascript",
 										"exec": [
 											""
@@ -3528,7 +3528,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "25349ed5-4030-41bc-a22b-2093961b43f4",
+										"id": "e139fbaa-e6a2-4e86-8923-26ea8adf1583",
 										"type": "text/javascript",
 										"exec": [
 											""
@@ -3552,7 +3552,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "d1195033-78b1-481b-acc9-845df5ddae80",
+										"id": "3e6758a2-1e9c-46d8-9101-29d9f2030ce5",
 										"exec": [
 											"pm.test(\"Status code is 201\", function () {",
 											"    pm.response.to.have.status(201);",
@@ -3609,7 +3609,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "c37cba72-91c2-4850-80cd-6fd3908e406e",
+										"id": "e4f22d6c-9647-43b2-b3d2-3f9dbfb75d6c",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -3624,7 +3624,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "b665041c-4138-4807-944d-1e278c44cfcb",
+										"id": "b596b96c-a4f2-45a6-8893-9def834c3d41",
 										"exec": [
 											"let domain = pm.environment.get(\"domain\");",
 											"let identityProvider = 'default-idp-'+domain;",
@@ -3683,7 +3683,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "c4f7e57e-fd63-4af1-ac71-a7b0299757cf",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -3701,7 +3701,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "497aeab9-e50e-4ecc-8781-1993b8362983",
 										"exec": [
 											""
 										],
@@ -3731,8 +3731,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -3752,7 +3752,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "0ed1f640-2b44-4f20-a97d-1b9fcaa5cb26",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -3770,7 +3770,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "02998134-741f-4860-b7cd-5dba872be7ca",
 										"exec": [
 											""
 										],
@@ -3821,7 +3821,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "e80649da-26c6-4e69-b7bb-5e35b2c8d141",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -3840,7 +3840,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "eed32ec9-17a3-4317-866a-0f2878114d74",
 										"exec": [
 											""
 										],
@@ -3870,8 +3870,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -3891,7 +3891,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "9ce0e921-8bb6-482c-b5c3-ad9a50658152",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -3951,7 +3951,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "c67bcf5d-ec2f-4c03-85d4-98eb58bf8d14",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -3969,7 +3969,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "94e2c0ee-7201-4545-9dc9-3cc46dd1622c",
 										"exec": [
 											""
 										],
@@ -3999,8 +3999,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -4020,7 +4020,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "391fc145-a439-47bd-a119-c10fc674e51d",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -4080,7 +4080,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "5bb46c75-c9f0-434b-83fe-4f868f71b3be",
 										"exec": [
 											"pm.test(\"Status code is 204\", function () {",
 											"    pm.response.to.have.status(204);",
@@ -4136,7 +4136,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "df214484-86f3-4433-866c-fd318c94ed43",
 										"exec": [
 											"pm.test(\"Status code is 200\", function () {",
 											"    pm.response.to.have.status(200);",
@@ -4153,7 +4153,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "f7d2f9ff-4dfb-453a-8f60-375ca27f5888",
 										"exec": [
 											""
 										],
@@ -4204,7 +4204,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "05289d85-df5c-4b13-af93-3a91620ab22b",
 										"exec": [
 											"pm.test(\"Status code is 404\", function () {",
 											"    pm.response.to.have.status(404);",
@@ -4258,7 +4258,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "56ffba4f-b70a-452d-a063-8c3865594fd4",
+										"id": "4aef6d53-818e-4e53-81a0-da24b89c682a",
 										"exec": [
 											"pm.test(\"Status code is 204\", function () {",
 											"    pm.response.to.have.status(204);",
@@ -4307,7 +4307,7 @@
 								{
 									"listen": "test",
 									"script": {
-										"id": "462b93ec-a015-41b8-a1bf-8d5446fc31aa",
+										"id": "bf165de6-d52a-4edf-9324-ac9c2574ca7b",
 										"exec": [
 											"pm.test(\"Status code is 400\", function () {",
 											"    pm.response.to.have.status(400);",
@@ -4325,7 +4325,7 @@
 								{
 									"listen": "prerequest",
 									"script": {
-										"id": "904f0113-b2b9-4645-9511-48bb10791506",
+										"id": "0ab5a6e9-cd23-46d4-b127-3155282f3b29",
 										"exec": [
 											""
 										],
@@ -4355,8 +4355,8 @@
 											"type": "text"
 										},
 										{
-									"key": "password",
-									"value": "#CoMpL3X-P@SsW0Rd",
+											"key": "password",
+											"value": "#CoMpL3X-P@SsW0Rd",
 											"type": "text"
 										}
 									]
@@ -4383,7 +4383,7 @@
 				{
 					"listen": "test",
 					"script": {
-						"id": "abfa8366-3ee2-45b0-b658-0040b79d565c",
+						"id": "e34c0eff-34e8-4134-be60-4ca71616965b",
 						"exec": [
 							"pm.test(\"Status code is 204\", function () {",
 							"    pm.response.to.have.status(204);",


Test patch:
diff --git a/gravitee-am-service/src/test/java/io/gravitee/am/service/UserServiceTest.java b/gravitee-am-service/src/test/java/io/gravitee/am/service/UserServiceTest.java
index 6b32638ff9..a783dc50b9 100644
--- a/gravitee-am-service/src/test/java/io/gravitee/am/service/UserServiceTest.java
+++ b/gravitee-am-service/src/test/java/io/gravitee/am/service/UserServiceTest.java
@@ -215,7 +215,7 @@ public class UserServiceTest {
         user.setReferenceId(DOMAIN);
 
         NewUser newUser = new NewUser();
-        newUser.setUsername("#####");
+        newUser.setUsername("##&##");
         when(userRepository.findByUsernameAndSource(ReferenceType.DOMAIN, DOMAIN, newUser.getUsername(), newUser.getSource())).thenReturn(Maybe.empty());
         when(userRepository.create(any(User.class))).thenReturn(Single.just(user));
 
diff --git a/gravitee-am-service/src/test/java/io/gravitee/am/service/validators/UserValidatorTest.java b/gravitee-am-service/src/test/java/io/gravitee/am/service/validators/UserValidatorTest.java
index 435d373eb3..66bc955fb4 100644
--- a/gravitee-am-service/src/test/java/io/gravitee/am/service/validators/UserValidatorTest.java
+++ b/gravitee-am-service/src/test/java/io/gravitee/am/service/validators/UserValidatorTest.java
@@ -49,6 +49,17 @@ public class UserValidatorTest {
         assertNull(throwable);
     }
 
+    @Test
+    public void validate_displayNameEmail() {
+
+        User user = getValidUser();
+        user.setDisplayName("user.valid+1-test@gravitee.io");
+
+        Throwable throwable = UserValidator.validate(user).blockingGet();
+
+        assertNull(throwable);
+    }
+
     @Test
     public void validate_usernameHashtag() {
 
@@ -112,7 +123,7 @@ public class UserValidatorTest {
     public void validate_invalidDisplayName() {
 
         User user = getValidUser();
-        user.setNickName("$¨¨^invalid");
+        user.setDisplayName("$¨¨^invalid");
 
         Throwable throwable = UserValidator.validate(user).blockingGet();
 
@@ -143,4 +154,4 @@ public class UserValidatorTest {
 
         return user;
     }
-}
\ No newline at end of file
+}