From 3ad18c5fdfb49f560f989c80ed51893aaa8ad937 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Sun, 7 Jan 2018 13:29:00 -0800 Subject: [PATCH 1/2] Invite User functionality --- .../stable/2017-03-01/apimusers.json | 46 ++++++++++++++++++- .../ApiManagementCreateUserBasic.json | 22 ++++++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/apimusers.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/apimusers.json index 53d8180ddde8..8ec66767caa7 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/apimusers.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/apimusers.json @@ -692,6 +692,28 @@ "password": { "type": "string", "description": "User Password. If no value is provided, a default password is generated." + }, + "confirmation": { + "type": "string", + "description": "Determines the type of confirmation e-mail that will be sent to the newly created user.", + "enum": [ + "signup", + "invite" + ], + "x-ms-enum": { + "name": "Confirmation", + "modelAsString": true, + "values": [ + { + "value": "signup", + "description": "Send an e-mail to the user confirming they have successfully signed up." + }, + { + "value": "invite", + "description": "Send an e-mail inviting the user to sign-up and complete registration." + } + ] + } } }, "allOf": [ @@ -713,12 +735,32 @@ "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.", "enum": [ "active", - "blocked" + "blocked", + "pending", + "deleted" ], "default": "active", "x-ms-enum": { "name": "UserState", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "value": "active", + "description": "User state is active." + }, + { + "value": "blocked", + "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API." + }, + { + "value": "pending", + "description": "User account is pending. Requires identity confirmation before it can be made active." + }, + { + "value": "deleted", + "description": "User account is closed. All identities and related entities are removed." + } + ] } }, "note": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json index b6ee1844555b..eb153899462d 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json @@ -9,14 +9,15 @@ "properties": { "firstName": "foo", "lastName": "bar", - "email": "foobar@outlook.com" + "email": "foobar@outlook.com", + "confirmation": "signup" } } }, "responses": { "201": { "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", "type": "Microsoft.ApiManagement/service/users", "name": "5931a75ae4bbd512288c680b", "properties": { @@ -24,8 +25,17 @@ "lastName": "bar", "email": "foobar@outlook.com", "state": "active", - "registrationDate": "2017-06-02T18:22:12.98Z", - "groups": [], + "registrationDate": "2018-01-07T21:21:29.16Z", + "groups": [ + { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b539c53f5b0062020002", + "name": "Developers", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "type": "system", + "externalId": null + } + ], "identities": [ { "provider": "Basic", @@ -37,7 +47,7 @@ }, "200": { "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", "type": "Microsoft.ApiManagement/service/users", "name": "5931a75ae4bbd512288c680b", "properties": { @@ -45,7 +55,7 @@ "lastName": "bar", "email": "foobar@outlook.com", "state": "active", - "registrationDate": "2017-06-02T18:22:12.98Z", + "registrationDate": "2018-01-07T21:21:29.16Z", "groups": [], "identities": [ { From 17b480f076620f4fd75f5f0e50c95e8817892603 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Sun, 7 Jan 2018 13:50:01 -0800 Subject: [PATCH 2/2] Fix Issue with Example --- .../examples/ApiManagementCreateUserBasic.json | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json index eb153899462d..f15f5c0ae0b4 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/examples/ApiManagementCreateUserBasic.json @@ -26,16 +26,7 @@ "email": "foobar@outlook.com", "state": "active", "registrationDate": "2018-01-07T21:21:29.16Z", - "groups": [ - { - "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b539c53f5b0062020002", - "name": "Developers", - "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", - "builtIn": true, - "type": "system", - "externalId": null - } - ], + "groups": [], "identities": [ { "provider": "Basic",