POST https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups
{
"name": "My group",
"description": "My group description"
}
Response:
{
"name": "My group",
"description": "My group description",
"_id": "751e8a9f-3d69-4151-b38b-524048038525"
}
PUT https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID
{
"name": "My new group name",
"description": "My new group description"
}
Response:
{
"_id": "751e8a9f-3d69-4151-b38b-524048038525",
"name": "My new group name",
"description": "My new group description"
}
DELETE https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID
Response:
{
"_id": "cd4dc2d0-fda0-49d9-a883-ec25b8da2b0f",
"name": "Fabrikam",
"description": "The company"
}
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/members
Response:
[
{
"email": "[email protected]",
"email_verified": false,
"updated_at": "2016-03-25T05:12:26.031Z",
"user_id": "auth0|1111111111111",
"name": "[email protected]",
"nickname": "some-user",
"identities": [
{
"user_id": "1111111111111",
"provider": "auth0",
"connection": "Username-Password-Authentication",
"isSocial": false
}
],
"created_at": "2016-03-25T05:12:25.117Z",
"last_ip": "1.1.1.1",
"last_login": "2016-03-25T05:12:26.030Z",
"logins_count": 1
},
{
"email": "[email protected]",
"name": "John Fabrikam",
"given_name": "John",
"email_verified": true,
"updated_at": "2016-03-21T09:43:12.208Z",
"picture": "https://s.gravatar.com/avatar/5426f6b9d63ad92d60e6fe9fdf83aa21?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fjf.png",
"user_id": "adfs|[email protected]",
"nickname": "john",
"identities": [
{
"user_id": "[email protected]",
"provider": "adfs",
"connection": "test-adfs",
"isSocial": false
}
],
"created_at": "2016-02-15T18:16:13.822Z",
"blocked": false,
"last_login": "2016-02-24T10:50:43.679Z",
"logins_count": 11
}
]
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/mappings
Response:
[
{
"_id": "bc7fe950-7d9f-4a7e-9302-0e9603fec270",
"groupName": "Domain Users",
"connectionName": "fabrikam-ad (ad)"
}
]
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/nested
Response:
[
{
"_id": "f58b701c-14a1-411a-a7a0-e1aedcfae2b1",
"name": "Fabrikam IT",
"description": "Supporting IT services",
"members": [
"google-oauth2|1111111111",
"google-oauth2|2222222222"
]
}
]
PATCH https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/nested
[
"433c2877-eeb5-4357-9ca0-92289c06e172"
]
DELETE https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/nested
{ groupId: "433c2877-eeb5-4357-9ca0-92289c06e172" }
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/members/nested
Response:
[
{
"user": {
"user_id": "google-oauth2|1333929933",
"name": "User Abc",
"nickname": "abc",
"email": "[email protected]"
},
"group": {
"_id": "f58b701c-14a1-411a-a7a0-e1aedcfae2b1",
"name": "Fabrikam IT",
"description": "Supporting IT services"
}
},
{
"user": {
"user_id": "adfs|[email protected]",
"name": "John Fabrikam",
"nickname": "john",
"email": "[email protected]"
},
"group": {
"_id": "cd4dc2d0-fda0-49d9-a883-ec25b8da2b0f",
"name": "Fabrikam",
"description": "The company"
}
}
]
Note: The response contains the group where the user originates from (to know in which nested group the user was found).
PATCH https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/members
[
"ad|fabrikam-ad|ae619853-9886-42db-966b-e88961671412",
"auth0|5632501f468f0f1756f4cab0"
]
DELETE https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups/GROUP_ID/members
{
"userId": "adfs|[email protected]"
}
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/groups
Response:
[
{
"_id": "cd4dc2d0-fda0-49d9-a883-ec25b8da2b0f",
"name": "Fabrikam",
"description": "The company",
"members": [
"auth0|56f4c8b9273a70fe6823ef65",
"adfs|[email protected]"
],
"nested": [
"f58b701c-14a1-411a-a7a0-e1aedcfae2b1"
],
"mappings": [
{
"_id": "bc7fe950-7d9f-4a7e-9302-0e9603fec270",
"groupName": "Domain Users",
"connectionName": "fabrikam-ad"
}
]
},
{
"_id": "f58b701c-14a1-411a-a7a0-e1aedcfae2b1",
"name": "Fabrikam IT",
"description": "Supporting IT services",
"members": [
"google-oauth2|109051264933766380611",
"google-oauth2|100155328118194762201"
],
"mappings": []
}
]
Note: The response only contains the direct members of the group. Members that are the result of nested groups or group mappings will not show here.
GET https://sandbox.it.auth0.com/api/run/YOUR_ACCCOUNT/YOUR_EXTENSION/api/users/USER_ID/groups
Response:
[
{
"_id": "cd4dc2d0-fda0-49d9-a883-ec25b8da2b0f",
"name": "Fabrikam",
"description": "The company"
}
]