Repository: Azure/azure-cli

Issue:
RBAC: support AD group commands
1. Author commands under `az ad group`, to be in parity with xplat's
2. On `group list`, add `--display-name` filtering
3. support group name when resolve `--assignee' on role creation

Discussion:
yugangw-msft: ```bash
(env) D:\sdk\azure-cli>az ad group -h

Group
    az ad group: Manage Azure Active Directory groups.

Subgroups:
    member           : Manage Azure Active Directory group members.

Commands:
    create           : Create a group in the directory.
    delete           : Delete a group in the directory.
    get-member-groups: Gets a collection that contains the Object IDs of the groups of which the
                       group is a member.
    list             : List groups in the directory.
    show             : Gets group information from the directory.

(env) D:\sdk\azure-cli>az ad group member -h

Group
    az ad group member: Manage Azure Active Directory group members.

Commands:
    add   : Add a memeber to a group.
    check : Checks whether the specified user, group, contact, or service principal is a direct or a
            transitive member of the specified group.
    list  : Gets the members of a group.
    remove: Remove a memeber from a group.

```
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=h1) Report
> Merging [#2955](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/86c54142d7084eff0e8f2f5c7ae48ecbd53dfc0c?src=pr&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `85.1%`.

[![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2955/graphs/tree.svg?height=150&width=650&token=2pog0TKvF8&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #2955      +/-   ##
==========================================
+ Coverage   63.33%   63.41%   +0.07%     
==========================================
  Files         466      467       +1     
  Lines       26539    26584      +45     
  Branches     4069     4073       +4     
==========================================
+ Hits        16809    16858      +49     
+ Misses       8617     8609       -8     
- Partials     1113     1117       +4
```


| [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...-cli-role/azure/cli/command\_modules/role/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY3VzdG9tLnB5) | `33.56% <ø> (+1.6%)` | :arrow_up: |
| [...e-cli-role/azure/cli/command\_modules/role/\_help.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvX2hlbHAucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [...cli-role/azure/cli/command\_modules/role/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvX3BhcmFtcy5weQ==) | `100% <100%> (ø)` | :arrow_up: |
| [...li-role/azure/cli/command\_modules/role/commands.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY29tbWFuZHMucHk=) | `90.19% <100%> (+5.75%)` | :arrow_up: |
| [...role/azure/cli/command\_modules/role/\_validators.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvX3ZhbGlkYXRvcnMucHk=) | `76.66% <76.66%> (ø)` | |
| [...rofile/azure/cli/command\_modules/profile/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcHJvZmlsZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3Byb2ZpbGUvY3VzdG9tLnB5) | `35.21% <0%> (+2.81%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=footer). Last update [86c5414...85551c8](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/src/command_modules/azure-cli-role/HISTORY.rst b/src/command_modules/azure-cli-role/HISTORY.rst
index b34ef4fe7..5b6240d98 100644
--- a/src/command_modules/azure-cli-role/HISTORY.rst
+++ b/src/command_modules/azure-cli-role/HISTORY.rst
@@ -5,6 +5,7 @@ Release History
 2.0.3 (unreleased)
 ++++++++++++++++++
 * create-for-rbac: ensure SP's end date will not exceed certificate's expiration date (#2989)
+* RBAC: add full support for 'ad group' (#2016)
 
 2.0.2 (2017-04-17)
 ++++++++++++++++++
diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
index 852adcc35..25814a12f 100644
--- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
+++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
@@ -140,6 +140,10 @@ helps['ad group'] = """
     type: group
     short-summary: Manage Azure Active Directory groups.
 """
+helps['ad group member'] = """
+    type: group
+    short-summary: Manage Azure Active Directory group members.
+"""
 helps['ad sp'] = """
     type: group
     short-summary: Manage Azure Active Directory service principals for automation authentication.
diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py
index 828f046fc..9c749fcde 100644
--- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py
+++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py
@@ -8,9 +8,10 @@ from azure.cli.core.commands import CliArgumentType
 from azure.cli.core.commands import register_cli_argument
 from azure.cli.core.commands.parameters import enum_choice_list
 from .custom import get_role_definition_name_completion_list
+from ._validators import validate_group, validate_member_id, VARIANT_GROUP_ID_ARGS
 
 register_cli_argument('ad app', 'application_object_id', options_list=('--object-id',))
-register_cli_argument('ad app', 'display_name', help=' the display name of the application')
+register_cli_argument('ad app', 'display_name', help='the display name of the application')
 register_cli_argument('ad app', 'homepage', help='the url where users can sign in and use your app.')
 register_cli_argument('ad app', 'identifier', options_list=('--id',), help='identifier uri, application id, or object id')
 register_cli_argument('ad app', 'identifier_uris', nargs='+', help='space separated unique URIs that Azure AD can use for this app.')
@@ -47,6 +48,15 @@ register_cli_argument('ad', 'query_filter', options_list=('--filter',), help='OD
 register_cli_argument('ad user', 'mail_nickname', help='mail alias. Defaults to user principal name')
 register_cli_argument('ad user', 'force_change_password_next_login', action='store_true')
 
+group_help_msg = "group's object id or display name(prefix also works if there is a unique match)"
+for arg in VARIANT_GROUP_ID_ARGS:
+    register_cli_argument('ad group', arg, options_list=('--group', '-g'), validator=validate_group, help=group_help_msg)
+
+register_cli_argument('ad group get-member-groups', 'security_enabled_only', action='store_true', default=False, required=False)
+member_id_help_msg = 'The object ID of the contact, group, user, or service principal'
+register_cli_argument('ad group member add', 'url', options_list='--member-id', validator=validate_member_id, help=member_id_help_msg)
+register_cli_argument('ad group member', 'member_object_id', options_list='--member-id', help=member_id_help_msg)
+
 register_cli_argument('role', 'scope', help='scope at which the role assignment or definition applies to, e.g., /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM')
 register_cli_argument('role assignment', 'role_assignment_name', options_list=('--name', '-n'))
 register_cli_argument('role assignment', 'role', help='role name or id', completer=get_role_definition_name_completion_list)
diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_validators.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_validators.py
new file mode 100644
index 000000000..e88fb273b
--- /dev/null
+++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_validators.py
@@ -0,0 +1,44 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import uuid
+from azure.cli.core.util import CLIError
+from ._client_factory import _graph_client_factory
+
+VARIANT_GROUP_ID_ARGS = ['object_id', 'group_id', 'group_object_id']
+
+
+def validate_group(namespace):
+    # For AD auto-commands, here we resolve logic names to object ids needed by SDK methods
+    attr, value = next(((x, getattr(namespace, x)) for x in VARIANT_GROUP_ID_ARGS
+                        if hasattr(namespace, x)))
+    try:
+        uuid.UUID(value)
+    except ValueError:
+        client = _graph_client_factory()
+        sub_filters = []
+        sub_filters.append("startswith(displayName,'{}')".format(value))
+        sub_filters.append("displayName eq '{}'".format(value))
+        result = list(client.groups.list(filter=' or '.join(sub_filters)))
+        count = len(result)
+        if count == 1:
+            setattr(namespace, attr, result[0].object_id)
+        elif count == 0:
+            raise CLIError("No group matches the name of '{}'".format(value))
+        else:
+            raise CLIError("More than one groups match the name of '{}'".format(value))
+
+
+def validate_member_id(namespace):
+    from azure.cli.core._profile import Profile, CLOUD
+    try:
+        uuid.UUID(namespace.url)
+        profile = Profile()
+        _, _, tenant_id = profile.get_login_credentials()
+        graph_url = CLOUD.endpoints.active_directory_graph_resource_id
+        namespace.url = '{}{}/directoryObjects/{}'.format(graph_url, tenant_id,
+                                                          namespace.url)
+    except ValueError:
+        pass  # let it go, invalid values will be caught by server anyway
diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py
index 3a490dfef..86a2a689b 100644
--- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py
+++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py
@@ -105,12 +105,23 @@ cli_command(__name__, 'ad user list', 'azure.cli.command_modules.role.custom#lis
 cli_command(__name__, 'ad user create', 'azure.cli.command_modules.role.custom#create_user',
             get_graph_client_users)
 
-cli_command(__name__, 'ad group delete',
-            'azure.graphrbac.operations.groups_operations#GroupsOperations.delete',
-            get_graph_client_groups)
-cli_command(__name__, 'ad group show',
-            'azure.graphrbac.operations.groups_operations#GroupsOperations.get',
-            get_graph_client_groups,
+group_path = 'azure.graphrbac.operations.groups_operations#GroupsOperations.{}'
+cli_command(__name__, 'ad group create', group_path.format('create'), get_graph_client_groups)
+cli_command(__name__, 'ad group delete', group_path.format('delete'), get_graph_client_groups)
+cli_command(__name__, 'ad group show', group_path.format('get'), get_graph_client_groups,
             exception_handler=empty_on_404)
-cli_command(__name__, 'ad group list', 'azure.cli.command_modules.role.custom#list_groups',
+cli_command(__name__, 'ad group list',
+            'azure.cli.command_modules.role.custom#list_groups',
+            get_graph_client_groups)
+
+cli_command(__name__, 'ad group get-member-groups', group_path.format('get_member_groups'),
+            get_graph_client_groups)
+
+cli_command(__name__, 'ad group member list', group_path.format('get_group_members'),
+            get_graph_client_groups)
+cli_command(__name__, 'ad group member add', group_path.format('add_member'),
+            get_graph_client_groups)
+cli_command(__name__, 'ad group member remove', group_path.format('remove_member'),
+            get_graph_client_groups)
+cli_command(__name__, 'ad group member check', group_path.format('is_member_of'),
             get_graph_client_groups)
diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py
index 4ccf4d0c8..5d22e92e2 100644
--- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py
+++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py
@@ -357,12 +357,14 @@ create_user.__doc__ = UserCreateParameters.__doc__
 
 
 def list_groups(client, display_name=None, query_filter=None):
+    '''
+    list groups in the directory
+    '''
     sub_filters = []
     if query_filter:
         sub_filters.append(query_filter)
     if display_name:
         sub_filters.append("startswith(displayName,'{}')".format(display_name))
-
     return client.list(filter=(' and ').join(sub_filters))
 
 


Test patch:
diff --git a/src/command_modules/azure-cli-role/tests/recordings/test_graph_group_scenario.yaml b/src/command_modules/azure-cli-role/tests/recordings/test_graph_group_scenario.yaml
new file mode 100644
index 000000000..325267215
--- /dev/null
+++ b/src/command_modules/azure-cli-role/tests/recordings/test_graph_group_scenario.yaml
@@ -0,0 +1,1048 @@
+interactions:
+- request:
+    body: '{"passwordProfile": {"forceChangePasswordNextLogin": false, "password":
+      "Test1234!!"}, "accountEnabled": true, "userPrincipalName": "deleteme1@AzureSDKTeam.onmicrosoft.com",
+      "mailNickname": "deleteme1", "displayName": "deleteme1"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad user create]
+      Connection: [keep-alive]
+      Content-Length: ['230']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.User/@Element","odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"41109d4c-94f8-4308-a702-0a6f541d16a4","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme1","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme1","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:51.7535386Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme1@AzureSDKTeam.onmicrosoft.com","userType":"Member"}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['1216']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:50 GMT']
+      Duration: ['8671347']
+      Expires: ['-1']
+      Location: ['https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/41109d4c-94f8-4308-a702-0a6f541d16a4/Microsoft.DirectoryServices.User']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [WJ9iNj7ky7Q0raKkGm6593SGt4ZAaZkDQgVPLNeXP0c=]
+      ocp-aad-session-key: [jpR7XXuX_T1kxSIkqFOB52jihfMTnn9SH4VWMOFXyp0ZNiFqhwsUnGl9wn5W-i3hqVx0J62RXwirgueJgLB7qRY_ZrmB5UZud2phlU0NZcVvhFOgMjFVJThd1KC61mYY5N6N537jdMmLDDe2_RIDEKhMkPKPw-JnPn_nCbLSWnIG-vqlchEdaqCdFEvyQgkdP4yedcwRXuAbmqp4jujqfQ.M32PAKgiR6c_upGTEedeqJUTCKT98l29GfNeezk8wW4]
+      request-id: [42b9d2f6-90dc-456e-aff0-1711d90eeaed]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 201, message: Created}
+- request:
+    body: '{"passwordProfile": {"forceChangePasswordNextLogin": false, "password":
+      "Test1234!!"}, "accountEnabled": true, "userPrincipalName": "deleteme2@AzureSDKTeam.onmicrosoft.com",
+      "mailNickname": "deleteme2", "displayName": "deleteme2"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad user create]
+      Connection: [keep-alive]
+      Content-Length: ['230']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.User/@Element","odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"649c0cdc-2f45-4f78-b1d9-f555756dedba","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme2","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme2","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:52.5000485Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme2@AzureSDKTeam.onmicrosoft.com","userType":"Member"}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['1216']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:53 GMT']
+      Duration: ['8892284']
+      Expires: ['-1']
+      Location: ['https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/649c0cdc-2f45-4f78-b1d9-f555756dedba/Microsoft.DirectoryServices.User']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [u3zz2DALsiEmtzDI1/lFfQ0UcLsw4WkTvQJPQAl1nu0=]
+      ocp-aad-session-key: [f0dEeZJswiKEs92Lt9GL5-gLCN0jfABXm0H0UrGYDbLoIs1s9Unws4ropIkTTPi1k8dbWjdcn2f-K9WkvLjsuiFwqtDyqYVBbABZYoGcs0cQ7Xo2h-kCKGjn13kbIfLLbcMs_RfGHsGewZ2cVvBZ1KbjcBKlfr4nEbWcfcM27tL7-EIP1vD_02lCmR0TZzQbtp0VFMdz83xs741c15862w.60JMcr9O_9PccmmONTfbG1v4nt-abfjZE6V41dTdMHM]
+      request-id: [707086d5-fa4b-4c2a-bf73-e294b49af987]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 201, message: Created}
+- request:
+    body: '{"securityEnabled": true, "mailEnabled": false, "mailNickname": "deleteme_g",
+      "displayName": "deleteme_g"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group create]
+      Connection: [keep-alive]
+      Content-Length: ['106']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element","odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['552']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:53 GMT']
+      Duration: ['2380019']
+      Expires: ['-1']
+      Location: ['https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/b511b706-141f-48e5-a700-7015860dbb04/Microsoft.DirectoryServices.Group']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [NQzzohdyto5u0aXRdIyWmvWAgmuTAftnKRMh6cwShWo=]
+      ocp-aad-session-key: [GJRbngTR61d56iJMPzyG31LFKOekl2lCiAF_4guv3uTEJM0pTp1IYSXej2vgjzZSZr_wc_QSSG2GjGPcvHSz6PHgpFZmyQKBORagTwJf6Sgnb5Cjq1ARhihaDfMoLp2Nwp3UKTdz4UmNlo48Act_66uoyRctddJV4xDNfX-_ib-u3psokOIAHlwOJaPCtt1a9lQZz3vYDNalIBgj2PgYlA.oysqr2-y3Dlx0zLdT6uZXhz1yUSnwGH8jKUIgr_3Exg]
+      request-id: [d7b18b60-8e95-4124-a278-e11110db1fdb]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 201, message: Created}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member add]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:53 GMT']
+      Duration: ['613565']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [4GoW7S4gK6ZADtJZ7anfPxmmIML2y1bLgHB/c5EmhGY=]
+      ocp-aad-session-key: [lVsL2ZNIVd6_koFCuZYBVypsOnwVi5RhktUhdU4EOGiAAogYhHtSeHArVlX-7J8V10S0K9VoDpn6J5ea_hgJcPbIjRBnF4jV6D5ignl8wpDUtDNricnghCITwDfGvtKDnbVhp_QlOmzpYEmTp89GzRvC6Hbt3qTqOk8GCCLG8qLC7dQhBO3UhtB8muEE4Zmu1__yXL1MO2LmRryH1XCw8A.nhxhzPCkXl7HVSP-Pg4r1wzJz42LCmtEjBeRUPQMxkE]
+      request-id: [649d075d-95f3-45d8-a462-91d4057163ea]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: '{"url": "https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/41109d4c-94f8-4308-a702-0a6f541d16a4"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member add]
+      Connection: [keep-alive]
+      Content-Length: ['127']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/$links/members?api-version=1.6
+  response:
+    body: {string: ''}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      DataServiceVersion: [1.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:53 GMT']
+      Duration: ['1463966']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [p2VNFLoaL7S6Sl7mYZqZdKbM00cEf5mOy6vYy8NtAMg=]
+      ocp-aad-session-key: [Mc2Rjck_-jBXj-Da58jstd6v38mDi8GHdb2HNhm0rmJVN4CnooTHUAOMHHzq-fnbQ6URRFeYUV7EUwhf4nkA4SiNG4SWiwU8APAhVn8jrJs_xUXrjvo1Z1gu3Xnv0YWX0rTpX3eeV4WhXYbJWg2cYChAzF3ebXuW8YbR5tNl59MAKKM9w5ROdxY7s9BTm4UdJOQ7aWIr3H007p_RZaly7Q.WeG2JMDgIMMM0KjLnGgvWRoJz3GGEcTU-iOiCtPgYcU]
+      request-id: [691a8ac3-715c-4eb1-9d64-993356b5ac53]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 204, message: No Content}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member add]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:51 GMT']
+      Duration: ['633708']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [TJ/xKag4M2mTYYn3oFmzro7Z2/Yt3ZkfYZ6omhAf2Kg=]
+      ocp-aad-session-key: [tgzoU9JUnwbYTWQcIfGbFU9A5W7_pdTcN0MBB9GgzZuOJh7dQmg5gx7ACvLmuf5YX96wBimFsnGbYtimx3Ue8KEOK6sCqxOqjn_c2ftwkiNKYhY2sqkV17KEou3pL0GJtiIRJwIWjdBS65lflkOVW1C6eRFPm-8ga8R7ufl1zYkMCeTXhPesVuQwQ4Qrg08XJ3g6tmeN82T6hgg3tA7VFA.QOc5DkKbo5rfi87-6n1xJSgJ_TOkNRnKZXh3b2Vebsc]
+      request-id: [e7ce4ca2-f289-431d-9489-f972e8c2b93c]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: '{"url": "https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/649c0cdc-2f45-4f78-b1d9-f555756dedba"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member add]
+      Connection: [keep-alive]
+      Content-Length: ['127']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/$links/members?api-version=1.6
+  response:
+    body: {string: ''}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      DataServiceVersion: [1.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:55 GMT']
+      Duration: ['2588595']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [O47BPeqbxW4dIh1dbaaiyT5Lss9ZWY0UVhN/+FnW4PY=]
+      ocp-aad-session-key: [KgIPVZbeF1-PL2sO3Kq1GECy_eOyO76-rtcBT5GQPHLLl7N1ZokI5rqNitIKraWaBreIZ3jXYLgzlHMUQNMtwzrndGu-_uhPi5S9ZfS4Fs8yv2OcXMz2j_pFKMbDtFI9E0vGk4Sr9yAbKBOJnTgGak-yRYYo8UFB7TId3itnKuZWXEyTJq4L6UciG-kb8eyP_u1enjZivXzDqcCVVGY8cg.r_TJVu8lMP-4xXIuuhve7oo8HbA-AHdX7kHcI6zklY4]
+      request-id: [f7c039e8-5f75-4478-8606-dc0997ef1780]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 204, message: No Content}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group show]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:52 GMT']
+      Duration: ['967824']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [cze88VSQ6HNztT9BK1BBqepYViZ+GvMC7osQIs0Tj5w=]
+      ocp-aad-session-key: [-5j5Ahwc7IMTKpWeF-kh3_QD14JFDesEmh8WUaXsIe5DPRG0PLSt_hO9LNUVYwOruRczAEPAbYxyb6u1A660EkqUCguZnZ80Dr4BMjyCZX7W0I3oK9kg8X0_KQMBLo7fP0vOZfLt0Mb1WTU9nM4atfC0fpO0sDzZUiXssuMWO0RD0BOxK1gWtd_pszIHl9CRKaPqHVQ05EFKP62TVDXveg.iJ8127LwB9Up_Urrj0xvV-NV7k3u0wZDDSvuuRd36Rc]
+      request-id: [0afe37e2-23a2-426d-844b-3f514ecd2a71]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group show]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element","odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['552']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:53 GMT']
+      Duration: ['532282']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [bKebP66qgjbXsGkb8RKjEOK0Di4Z+mUFNK2uc4Kp3R8=]
+      ocp-aad-session-key: [DKS6X08Gzb4T4ohSw7NjrENjB-mLnbMLkOko1uC7zV5c7m2iakb2NG-ShAfDb-E1Rr-DwCq2FxxbowwD6Wwdr_TpzYWtJgULrB_ubgyAYbVkczf3Ycia8L0WyxKMXjk1HH3MbXXgZguiRXa6xSeVZcKS5_3UQE45TmCtVtNp9UzxMGBndJqmoDLrD429ppoJhlfA6jDJ1ok_dvSLgrWtoQ.Igsp3oo_oqgVSiCn5TWYqSXIghR4S2l2ghfvtMiaKQM]
+      request-id: [ef46cf12-ae59-4187-8170-eca9b76a29d9]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group show]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element","odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['552']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:56 GMT']
+      Duration: ['591932']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [GWBF+FqKrwi9lJ0Nz2UosGLK6d7IORKv9drCwOzHa0Q=]
+      ocp-aad-session-key: [YDIS_R4fAoyGIX0WhWxYFw1FDWyLY1HsyiMA3x6aTFyMyvnE637IV3Lz7H8clHb12vOw01PBH-sOscshSTjL11HPmJIDlwOcvBuRtOXvuZSWUyp4V8_jO4VdTIuK5zbjThFZS15oAV2ujYB_ND36x2GP4NkAmz6BeE8nVhwyPh15XqqbwVVgOjcKwRvcTV1QqkKezvHgqKy1DLkMbw2D_g.WHyFdJ3G1HsN6XQ9FsTfBpbcbd1q_QgBaLtqFYBIFug]
+      request-id: [0da9d692-6a81-469d-8202-ccb68bf23e9f]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group list]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:54 GMT']
+      Duration: ['636208']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [nG3hKVoq5XXuUdcuvSQIIaqQRGfFv8ulezCBqMPQCRQ=]
+      ocp-aad-session-key: [_hasrBAPYrcMyTqk7-JKvJ4RF_E-Q_0dnzcSp-N7p0WApD5pO_i0HzI0DCGesNwEcHm4k6o5g6n6uKj8xSDMCk7FnzOfWFt5CJlkdWphgf_AD2STxTEuyHFoLw9RTjN_zmklZHDhiMKtRDl1eMKUzMHgGucn0yh5jV1qpoYA3qeSjWVkPcm2tinQG3OLMk5XXEugvwGrczZfee0XgUDvOQ.pCR1otnzCj8LPTz0-pOtvCKF9lU7DmNKmNUOjR_kUsk]
+      request-id: [fb2902c6-d7b6-43be-86e5-f5c308ed2a07]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group get-member-groups]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:55 GMT']
+      Duration: ['602504']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [xU4JSRnBDDuUT0qZaU7x6kfvEIokIxo5omNgFl2G0G4=]
+      ocp-aad-session-key: [OTQMxLHuUsIgc3ZFQJfpfavOnhw_OX1uMKuj3-9lXQgemAd6Tl_qVYvMxqJd1eOK5BiMQqfpqktUM4hlumWo_1oEF1PiA_X0EGhEkiq1Wos7YLfDDtLhSGyJq8FtaltULVlTfSmnGD2Y56-KxCvrL5NenemOd5zCAJpt3QIWu4xJtUAcEXF3O4CkAGEXQNY6FqEIHnAAcY1LQgtp7YgAaA.Hk_VuLh7XR6rRAn66nmruKCFAtxoaCI04ld9oeZ1uzI]
+      request-id: [d6450c5b-c7ee-4a5a-96bb-5f2156e9ebfd]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: '{"securityEnabledOnly": false}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group get-member-groups]
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/getMemberGroups?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Collection(Edm.String)","value":[]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['127']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:57 GMT']
+      Duration: ['860475']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [2mzsumD7v4laEobzcd1BLO71t/RyrMmpEcVHR0ySBgI=]
+      ocp-aad-session-key: [CSlAkP3jSRRDYfT6gT36QzmwtPMLYLL1LgowcGHVZ4RFpymPbEI9Qd2HGpjuLrTZ2HC0iHL4vF1nYL_5CX_4ucK_wR8wobcCom93gvO9vH_qbu46h7sUSJoqtyPc7l0prau_VRTMenswmCWPnwpmHfcxzLeE5MkRZAjwWFFT1wozXKZRe90LJgkpfhCdWvdf95CbQZyIlkVZsKHc7WKgpw.KohCAEDmIrkgl533DVtAMiM36kmniAQPMrN5_Q5eupg]
+      request-id: [59972335-0452-498f-aac4-1e884a21f767]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member check]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:55 GMT']
+      Duration: ['669783']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [v4ImhedTSMLcBqRGrUg4p+YYyJPNNYsWlqCUOR8+Elg=]
+      ocp-aad-session-key: [fKytxFLzaKADa9Bj5TrZUEHhLwxnse5FP-NjTz6VUot1t9uEEqCAeNB5WzLnJGg9M8suutqxkx9Xdpd8BcZn0gTwo2W0Zv5NAdOdW-jWTYUuq6NShKhVkMocF4_ympjuMl91J8bwd71aVZcgy3bYlXOD-exyOqD0EgjiNr49dsBmsfcGXmfnDdtJP5Z3VSdkpt9EerqPWIGNoANAMk9q6A.CoXW9B-GDT0SMGocGBhmNouBV5eNzZYlIzuOz4N_jpg]
+      request-id: [209df732-f113-4a39-8949-953eefadd24e]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: '{"groupId": "b511b706-141f-48e5-a700-7015860dbb04", "memberId": "41109d4c-94f8-4308-a702-0a6f541d16a4"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member check]
+      Connection: [keep-alive]
+      Content-Length: ['103']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/isMemberOf?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Edm.Boolean","value":true}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['118']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:54 GMT']
+      Duration: ['810984']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [0lQ4vCmckKCyRLoL4AoEX4aKPw4qTo7BdYx2Pv/0osg=]
+      ocp-aad-session-key: [_JpCop26AtTqhzRT-f7kL870Cu-5buOlVaE8K2g8_Rd2jWW0iNt7stu5Iks2HBZngb442bG8iY0qXd-_L7GP-Uskag_kslAHZ9_AjfhxTZN7Sf3jECQVY0-ptyTGtzuH8Kwn8eSXNlXYujbMzaGY-SDGsKe6PAcvqdRCAvIMdPTY_JbiA8zMoLC8W38mru5qJZL3UZzx7KkMtA_v4GHAAg.dqfTW22-j6WG-x5hDsmTEDe4GivwGJnEQbTtwrRvWxA]
+      request-id: [2e0c0686-9861-4efd-b05a-117df3c4b83c]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member check]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:57 GMT']
+      Duration: ['657067']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [pl1kFb+g22xnnvGQgyu9q8Kv53mcwJTK0gXSbnmQHzY=]
+      ocp-aad-session-key: [D_nZv7BCyyH6hlTvgKbDTE9IazhxY-nkG1TuujzN3aIMX7Bd3iDvXMexnWqfxoqTZ-L-B80C5RPPCzHumjjdt0Pfc_g_dqyS_w-i6-kou6l74Zcf8URH_MldqFcP5qbxAm4HqVfDQnCeGX69Fmu2y02B7X37AZX-d-xoPPriC-CRq_6Q_of5IXQ016ZxTN_WWJbjw60cVV-nSaT7kkExew.EwnlKxADC8uYpvoJLAyjx2X5ah-tUT3CvsXDLLb3urU]
+      request-id: [ad92ec24-7416-4f12-8ddb-904ba9b727c2]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: '{"groupId": "b511b706-141f-48e5-a700-7015860dbb04", "memberId": "649c0cdc-2f45-4f78-b1d9-f555756dedba"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member check]
+      Connection: [keep-alive]
+      Content-Length: ['103']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/isMemberOf?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Edm.Boolean","value":true}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['118']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:58 GMT']
+      Duration: ['1363446']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [zBnO1zgN2HN/dAMzOnN35k2SLefJt7CbCenk7Vv7NR0=]
+      ocp-aad-session-key: [-TiuX6eJNiZR5sLdWaZrYhs1vdOlVQPbB7WGntmO-Ih8Sy-tgqZ231YAiFWoQ2vCeYr1pq3B5UGCuGhedAGVmCQOQqBTBRwP2TQklHXsYpMykYL5MkRcOhAe_hoYiwaFbCUt-3nRBTIgPl2Kr_fPelty82eT09gMO62-wEWE6kGZRqTLH_pC0xkLsLX547Kz12pSvACjjpIeCwyntegALw.Jg6m9-Tptl_sHwTs-qSTZjYkowuz5wne44awV_BfMv8]
+      request-id: [b0e3ec2f-6e1d-4a01-94af-fc1f3631f9e1]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member list]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:56 GMT']
+      Duration: ['503530']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [WJ9iNj7ky7Q0raKkGm6593SGt4ZAaZkDQgVPLNeXP0c=]
+      ocp-aad-session-key: [s4MzuxF7PdUctiURqSCyFM4YarHwm4Xu5NDwpXdGD5My5mOBj_10DJCTTiy9AoPB4yK-XLVblTzodQjoUCNqRrGmN7kWzDaBABnY07YXqM4yos8WfnagpjNKUOFwojko2DKzCRyozLN7zkI83OPUW0gpumTT756eA3CWeg9uzLPg1rDaDSEKfqWZQDZSnqHBpKTvuElFgi_zI9mZfjSqSQ.r6CVQarU5-XzxmQNj--scdG-3Js9D3MbCZE_kJmbriE]
+      request-id: [231fc766-9c95-4a42-a7af-5f3d513f9b4c]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member list]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/members?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"41109d4c-94f8-4308-a702-0a6f541d16a4","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme1","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme1","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:51Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme1@AzureSDKTeam.onmicrosoft.com","userType":"Member"},{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"649c0cdc-2f45-4f78-b1d9-f555756dedba","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme2","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme2","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:52Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme2@AzureSDKTeam.onmicrosoft.com","userType":"Member"}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['2236']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:58 GMT']
+      Duration: ['830347']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [JI7Ca0Wtacsn3e2Y1FRjFO8qh6f3DNYttzXsIANsgIA=]
+      ocp-aad-session-key: [MyKWg_I_7XGy3aU0fv7IykF3JWU1LUc76ZrFlJDEvtngI9fjM9DxLbid04bmhYoZBAvaqjFJaKjxrlGFcS0NelPbaxVPvznRSXuK7NcWM-IkpLYC8luNgPfTljTa1pp5k5HiAqVf92DeIoUa_wymsCnUzIxUiKghvZEatWPw9MJBgHQ-lnZabqBHu1w0txkA3UJqmExlJDkBg0TQmZWS2Q.gpY5bTlXcwfHZilpCGbJQz-Ylxl0IhfTIxagx5dUeqg]
+      request-id: [f4acfc1e-6b2f-4a79-a502-03cd8f5801d2]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member remove]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:56 GMT']
+      Duration: ['506900']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [O47BPeqbxW4dIh1dbaaiyT5Lss9ZWY0UVhN/+FnW4PY=]
+      ocp-aad-session-key: [z3lSHGlTSyWGBXraRiHc-kHSCzKy0CuH27o-v5Pwjd4NwNooZ8I_jmixBVTiX7R6x8sS0E9PL-ob1hIfN18dGzZestDbSPnaCmKn_4yjDCXWf_dh9_KfzB4OeIKyFiCwr5NcQU_FdngQuzO8rIgAaj5LK_KVRtwkeYMBlL-2EQxL1iDyGC7bF4t0rFxg-NVW_Y2i9mf-lPcJaLLprYsp1g.zOxy-ZzKq9pq0K03tQs5zxP8SKJy7WhxY8OkRrXu8bE]
+      request-id: [f1df41ee-cd2b-47c2-a7a4-26ab3d4ea6ce]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member remove]
+      Connection: [keep-alive]
+      Content-Length: ['0']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: DELETE
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/$links/members/41109d4c-94f8-4308-a702-0a6f541d16a4?api-version=1.6
+  response:
+    body: {string: ''}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      DataServiceVersion: [1.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:56 GMT']
+      Duration: ['2264001']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [Gn/SyFs1dI76n3DdqL7J62Lgmc/wMbIjPyRQ+vCls0k=]
+      ocp-aad-session-key: [isZqfNhyBGpSID-iupVpM_ceSzx5HasaP6wT7cUFjc3dCRd5lXE7q6NOyFu3X6TdoL46o3pCXbouBhVkFww7EuyeivddBZrlDoW8157LvM5fc3EgDsbWa1fJien5MrYKog38AmLG-vKsiBShDkYm7bY2wX1dM053D7EldRlq23ogZyWLuTufr1AwWqw6IwAfVHCTmSyYdiDqcM2EaHp7uA.MdO06y-NG9KQaVpO4ZZQx5UZErNAGqsaIheOrl2WkK8]
+      request-id: [c95e201a-2ef2-4d3e-8c4c-289d67778d25]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 204, message: No Content}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member check]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:56 GMT']
+      Duration: ['902544']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [JI7Ca0Wtacsn3e2Y1FRjFO8qh6f3DNYttzXsIANsgIA=]
+      ocp-aad-session-key: [Ixi9Zw0nnJ_cLexDXVKMMyDHI12GEB7Bqe6jHvOJto-z3SrIRxrBmmL2C2e7Ei0JYvrKblOJQyxcEM10Ko6Tux1bJizCcnOgaGfbwoUArfpn4L5i5npLxYycpIvC9ccou4aZwEGBgTGrpU6ikpTtq7EHnwZuauUIhOWgw5YxKsoF8h_ALWrwV78X5jLy_XG_96DnNf_Tf2-YUm-TkXWXMw.ZWBUBsEQ0fvQGQLF_nUNzojvb7Ipzl_tmXCmDH0npWQ]
+      request-id: [23dc0b65-1128-421b-8e22-115ac2a482fd]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: '{"groupId": "b511b706-141f-48e5-a700-7015860dbb04", "memberId": "41109d4c-94f8-4308-a702-0a6f541d16a4"}'
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group member check]
+      Connection: [keep-alive]
+      Content-Length: ['103']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: POST
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/isMemberOf?api-version=1.6
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Edm.Boolean","value":false}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['119']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:58 GMT']
+      Duration: ['930994']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [iyH1L5ZSeWH83EP1icIOAwr148oY/OGtb+Pw+quNhWk=]
+      ocp-aad-session-key: [saU0G3jLDN3q38j_e89BHbOJSXIG3CVkdt7Wzj52cGrFX_KKTJv3sCwz_bDEdZnCi76bYCIGqFaM6ruj-zlJSp67G3nr1qJ-4_vOdVvtj6Mz3rE9v5MF61aRVPLevQCXCER_cCG_-9geT4yiKlsZ0SzyEgwC3PnnTIm30HJHoNYXoqTTyVm2ak-m_JdxzufWwOvB37r7dSN5Eknri5Z9Jg.uOFMAEkCGQ8MG7fjBTzaDP_d32TUwjLPLSYErDY4x00]
+      request-id: [00e0dbe2-a8d1-46d0-b626-d3dfedcf2ec1]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group delete]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['555']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:59 GMT']
+      Duration: ['534658']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [JI7Ca0Wtacsn3e2Y1FRjFO8qh6f3DNYttzXsIANsgIA=]
+      ocp-aad-session-key: [LLv91GFqIBDylaY8nCzsIu6ncyPFpFrDgwSG5WbQ6uaZziEtmR7JQCx7IHENvL0dC2pinnGg_rj3OpLKlW0HwIFosf_3nAVT83SjKP6HVF84kO2ggLil7PUMAgOr6QhVLuWxxzuqzmT_IeHnROOHR4HvuF7sw4fGyktpP-pGW3SKpHzjRmHdX1ot2Lv9Y35VQ9hVAwYKMzVMr2msGZ2SFw.Wzrkhf5M2eSmF3zPf8n-dtwLe1x9hXpSmHJRqSJt4p4]
+      request-id: [1eb02221-6565-4bd8-9e69-8260b570f66f]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group delete]
+      Connection: [keep-alive]
+      Content-Length: ['0']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: DELETE
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04?api-version=1.6
+  response:
+    body: {string: ''}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      DataServiceVersion: [1.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:59 GMT']
+      Duration: ['1432029']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [kuyxkXWpuMdFkyXupIcvORPNJ/cSc7C7Qv+yP0H/SL8=]
+      ocp-aad-session-key: [5r2cXJ4JlXL82zHO6N1eHSUTyf3gOowRwmmNcHP6io1291uQMjaFaSsBWVfvY04uFFhEqScMhiNyWuhF8DSty1LbfZulags2SjweEr93IPhdd2osXW5VF1gQEKruYOdwCLfyEI4RMk-CgkmgFAep4ED7FQI1CT-etHGenE2rawllPxncHXpunP3DvbMsSUys7dAyWaVFDChC9FfxQNzDew.c1-LftJXGu5ega3zTPx8GcZab8-viwiyOdm0nsBqKl0]
+      request-id: [a0a2c6e8-50d0-4950-b862-709348956edf]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 204, message: No Content}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad group list]
+      Connection: [keep-alive]
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: GET
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=
+  response:
+    body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"d758a069-52cc-47f6-bc00-961cea17be39","deletionTimestamp":null,"description":"for
+        bug investigation and will delete ","dirSyncEnabled":null,"displayName":"yugangwTestGroup","lastDirSyncTime":null,"mail":null,"mailNickname":"fb7f38a2-3b88-49a7-b890-71105a0091b7","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      Content-Length: ['623']
+      Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8]
+      DataServiceVersion: [3.0;]
+      Date: ['Fri, 21 Apr 2017 02:34:59 GMT']
+      Duration: ['648611']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [u3zz2DALsiEmtzDI1/lFfQ0UcLsw4WkTvQJPQAl1nu0=]
+      ocp-aad-session-key: [gdefyo02rjZpQ4alGN3LlhbqHuofuYFfbrWf8_HmgDE1RAsyLPD9__rN2qS7S7pnyeDJpd34iBfACME1vnWmEs8V3I7vNh5CiQcoy6VOIKwWfXLy7uFM_3H_w8A6f3hxqbuymCeTN0-4vP9b1SizZTrj9u3qYyPvznP2mGgSCO98zHyQLWPUG0t9fhxJlWb8pUHB7b0fNXxwjHDAAFnNxw.I9mpazRb1lY7F7iXf1Dn36KhFfZm-SNSVZu2NrR_DU8]
+      request-id: [a38f7538-9554-4955-bfb7-be38e1fcc9e9]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad user delete]
+      Connection: [keep-alive]
+      Content-Length: ['0']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: DELETE
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users/41109d4c-94f8-4308-a702-0a6f541d16a4?api-version=1.6
+  response:
+    body: {string: ''}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      DataServiceVersion: [1.0;]
+      Date: ['Fri, 21 Apr 2017 02:35:01 GMT']
+      Duration: ['11793485']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [1sP0P7WxKcBID6yc4fbz9MeUVowvkTIjVOQX5YMG/jY=]
+      ocp-aad-session-key: [JmkBUmhKvkEH-OeCNAXbnL4RSo-pgfrl4ubNDoMR7CaPOU_shaDJPHayz3PX_Gl3DSdPB_ingGSo2F7gb6CP87Il9yNmzvqM6ssWKm1RVSQU8ME4oYn-Qdhs7aXNRADVZVcefIgHUyDXRZDpZLp8YM6sauBkkyIfzcaum7CcjwGdeC6K04NUuwHA1n7HRx3ZKlbDGoDhAkUfRNsdM8_fjQ.mhlltQ0G6fsfwX-hzU4_V88B5c1IX8mwSx4QYhntv18]
+      request-id: [bd02d713-ee43-4416-b722-12e4385ace1e]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 204, message: No Content}
+- request:
+    body: null
+    headers:
+      Accept: [application/json]
+      Accept-Encoding: ['gzip, deflate']
+      CommandName: [ad user delete]
+      Connection: [keep-alive]
+      Content-Length: ['0']
+      Content-Type: [application/json; charset=utf-8]
+      User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7
+          msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python
+          AZURECLI/2.0.3+dev]
+      accept-language: [en-US]
+      x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3]
+    method: DELETE
+    uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users/649c0cdc-2f45-4f78-b1d9-f555756dedba?api-version=1.6
+  response:
+    body: {string: ''}
+    headers:
+      Access-Control-Allow-Origin: ['*']
+      Cache-Control: [no-cache]
+      DataServiceVersion: [1.0;]
+      Date: ['Fri, 21 Apr 2017 02:35:02 GMT']
+      Duration: ['12149129']
+      Expires: ['-1']
+      Pragma: [no-cache]
+      Server: [Microsoft-IIS/8.5]
+      Strict-Transport-Security: [max-age=31536000; includeSubDomains]
+      X-AspNet-Version: [4.0.30319]
+      X-Content-Type-Options: [nosniff]
+      X-Powered-By: [ASP.NET, ASP.NET]
+      ocp-aad-diagnostics-server-name: [DJl/5bFSkj1cqgm9u7PtSoh9YAGkLAPecUruXCQn6TE=]
+      ocp-aad-session-key: [njJm2iHZLEr7FCWeEBDNfjLMWjYHetqMGYgkQtXxVNV1MQ8WvEv2k9pcmTeXTng_zRF32wu714hTx3tXrQu6VvrLiLVnD61UKLRgTgLDxB59lSVfw6TiXIDCK32RzuStmWhNz33YkvLtjikdMd7sb3_4WDKff2j_8UsbUvxrz2vsYKg1ldnwhf1JnFqm8RlX1FcSKD_uTIWnbP9k9fIpKg.7J0h-ySRCH2ygywgtd1ktEKsMc4J1dy1wk5adRmYi3I]
+      request-id: [0c718af5-bcc8-4339-81c2-95653fe7aa58]
+      x-ms-dirapi-data-contract-version: ['1.6']
+    status: {code: 204, message: No Content}
+version: 1
diff --git a/src/command_modules/azure-cli-role/tests/test_graph.py b/src/command_modules/azure-cli-role/tests/test_graph.py
index ad32ff733..95f3b3655 100644
--- a/src/command_modules/azure-cli-role/tests/test_graph.py
+++ b/src/command_modules/azure-cli-role/tests/test_graph.py
@@ -2,8 +2,11 @@
 # Copyright (c) Microsoft Corporation. All rights reserved.
 # Licensed under the MIT License. See License.txt in the project root for license information.
 # --------------------------------------------------------------------------------------------
-
+import json
 from azure.cli.core.test_utils.vcr_test_base import VCRTestBase, JMESPathCheck, NoneCheck
+from azure.cli.testsdk import ScenarioTest
+from azure.cli.testsdk import JMESPathCheck as JMESPathCheck2
+from azure.cli.testsdk import NoneCheck as NoneCheck2
 
 
 class ServicePrincipalExpressCreateScenarioTest(VCRTestBase):
@@ -85,3 +88,71 @@ class ApplicationSetScenarioTest(VCRTestBase):
         # delete app
         self.cmd('ad app delete --id {}'.format(app_id_uri))
         self.cmd('ad app list --identifier-uri {}'.format(app_id_uri), checks=NoneCheck())
+
+
+class GraphGroupScenarioTest(ScenarioTest):
+
+    def test_graph_group_scenario(self):
+        self.user1 = 'deleteme1'
+        self.user1 = 'deleteme2'
+        upn = self.cmd('account show --query "user.name" -o tsv').output
+        _, domain = upn.split('@', 1)
+        user1 = 'deleteme1'
+        user2 = 'deleteme2'
+        group = 'deleteme_g'
+        password = 'Test1234!!'
+        try:
+            # create user1
+            user1_result = json.loads(self.cmd('ad user create --display-name {0} --password {1} --user-principal-name {0}@{2}'.format(user1, password, domain)).output)
+            # create user2
+            user2_result = json.loads(self.cmd('ad user create --display-name {0} --password {1} --user-principal-name {0}@{2}'.format(user2, password, domain)).output)
+            # create group
+            group_result = json.loads(self.cmd('ad group create --display-name {0} --mail-nickname {0}'.format(group)).output)
+            # add user1 into group
+            self.cmd('ad group member add -g {} --member-id {}'.format(group, user1_result['objectId']), checks=NoneCheck2())
+            # add user2 into group
+            self.cmd('ad group member add -g {} --member-id {}'.format(group, user2_result['objectId']), checks=NoneCheck2())
+            # show group
+            self.cmd('ad group show -g ' + group, checks=[
+                JMESPathCheck2('objectId', group_result['objectId']),
+                JMESPathCheck2('displayName', group)
+            ])
+            self.cmd('ad group show -g ' + group_result['objectId'], checks=[
+                JMESPathCheck2('displayName', group)
+            ])
+            # list group
+            self.cmd('ad group list --display-name ' + group, checks=[
+                JMESPathCheck2('[0].displayName', group)
+            ])
+            # show member groups
+            self.cmd('ad group get-member-groups -g ' + group, checks=[
+                JMESPathCheck2('length([])', 0)
+            ])
+            # check user1 memebership
+            self.cmd('ad group member check -g {} --member-id {}'.format(group, user1_result['objectId']), checks=[
+                JMESPathCheck2('value', True)
+            ])
+            # check user2 memebership
+            self.cmd('ad group member check -g {} --member-id {}'.format(group, user2_result['objectId']), checks=[
+                JMESPathCheck2('value', True)
+            ])
+            # list memebers
+            self.cmd('ad group member list -g ' + group, checks=[
+                JMESPathCheck2("length([?displayName=='{}'])".format(user1), 1),
+                JMESPathCheck2("length([?displayName=='{}'])".format(user2), 1),
+                JMESPathCheck2("length([])", 2),
+            ])
+            # remove user1
+            self.cmd('ad group member remove -g {} --member-id {}'.format(group, user1_result['objectId']))
+            # check user1 memebership
+            self.cmd('ad group member check -g {} --member-id {}'.format(group, user1_result['objectId']), checks=[
+                JMESPathCheck2('value', False)
+            ])
+            # delete the group
+            self.cmd('ad group delete -g ' + group)
+            self.cmd('ad group list', checks=[
+                JMESPathCheck2("length([?displayName=='{}'])".format(group), 0)
+            ])
+        finally:
+            self.cmd('ad user delete --upn-or-object-id ' + user1_result['objectId'])
+            self.cmd('ad user delete --upn-or-object-id ' + user2_result['objectId'])