Repository: cloud-custodian/cloud-custodian

Issue:
Custodian Mailer - Azure - Authorzation error & Authorization Header
### Description: 
Custodian will not run a mailer policy for azure.

### Environment: 
- fresh python 3 virtual environment
- fresh pull of cloud-custodian source code
- pip install ./cloud-custodian
- pip install ./cloud-custodian/tools/c7n_mailer
- pip install ./cloud-custodian/tools/c7n_azure

### Policy: 
```
policies:
  - name: azure-notify
    resource: azure.resourcegroup
    description: example policy
    actions:
      - type: notify
        template: default
        priority_header: '2'
        subject: Hello from C7N Mailer
        to:
          - me@work.com
        transport:
          type: asq
          queue: https://myblob.queue.core.windows.net/taskqueue
```
### terminal output: 
```(pypiCustodian) ➜  custodianDocker git:(master) ✗ custodian run -s azure://myblob.blob.core.windows.net/custodian-logs samplepolicy.yml && c7n-mailer --config mailer.yml --run
2018-10-31 12:37:52,023: custodian.azure.session:INFO Creating session with Service Principal Authentication
2018-10-31 12:37:52,023: custodian.azure.session:INFO Session using Subscription ID: xxx
2018-10-31 12:37:52,298: custodian.azure.session:INFO Creating session with Service Principal Authentication
2018-10-31 12:37:52,298: custodian.azure.session:INFO Session using Subscription ID: xxx
2018-10-31 12:37:53,708: custodian.policy:INFO policy: azure-notify resource:azure.resourcegroup region: count:7 time:0.24
2018-10-31 12:37:54,330: azure.storage.common.storageclient:ERROR Client-Request-ID=xxx Retry policy did not allow for a retry: Server-Timestamp=Wed, 31 Oct 2018 17:37:53 GMT, Server-Request-ID=d91f99ba-f003-0058-3840-71c093000000, HTTP status code=403, Exception=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. ErrorCode: AuthenticationFailed<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.RequestId:xxxxTime:2018-10-31T17:37:54.3412413Z</Message><AuthenticationErrorDetail>Audience validation failed. Audience did not match.</AuthenticationErrorDetail></Error>.
2018-10-31 12:37:54,331: custodian.output:ERROR Error while executing policy
Traceback (most recent call last):
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/c7n/policy.py", line 273, in run
    results = a.process(resources)
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/c7n_azure/actions.py", line 366, in process
    receipt = self.send_data_message(message, session)
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/c7n_azure/actions.py", line 374, in send_data_message
    return self.send_to_azure_queue(queue_uri, message, session)
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/c7n_azure/actions.py", line 377, in send_to_azure_queue
    queue_service, queue_name = StorageUtilities.get_queue_client_by_uri(queue_uri, session)
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/c7n_azure/storage_utils.py", line 49, in get_queue_client_by_uri
    queue_service.create_queue(storage.container_name)
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/queue/queueservice.py", line 537, in create_queue
    _dont_fail_on_exist(ex)
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/common/_error.py", line 92, in _dont_fail_on_exist
    raise error
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/queue/queueservice.py", line 532, in create_queue
    expected_errors=[_QUEUE_ALREADY_EXISTS_ERROR_CODE])
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/common/storageclient.py", line 381, in _perform_request
    raise ex
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/common/storageclient.py", line 306, in _perform_request
    raise ex
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/common/storageclient.py", line 292, in _perform_request
    HTTPError(response.status, response.message, response.headers, response.body))
  File /Dev/cloud-custodian/pypiCustodian/lib/python3.7/site-packages/azure/storage/common/_error.py", line 119, in _http_error_handler
    raise ex
```


Discussion:

Resolving patch:
diff --git a/tools/c7n_azure/c7n_azure/actions.py b/tools/c7n_azure/c7n_azure/actions.py
--- a/tools/c7n_azure/c7n_azure/actions.py
+++ b/tools/c7n_azure/c7n_azure/actions.py
@@ -352,10 +352,11 @@ def __init__(self, data=None, manager=None, log_dir=None):
 
     def process(self, resources, event=None):
         session = utils.local_session(self.manager.session_factory)
+        subscription_id = session.get_subscription_id()
         message = {
             'event': event,
-            'account_id': session.subscription_id,
-            'account': session.subscription_id,
+            'account_id': subscription_id,
+            'account': subscription_id,
             'region': 'all',
             'policy': self.manager.data}
 
@@ -363,18 +364,18 @@ def process(self, resources, event=None):
 
         for batch in utils.chunks(resources, self.batch_size):
             message['resources'] = batch
-            receipt = self.send_data_message(message, session)
+            receipt = self.send_data_message(message)
             self.log.info("sent message:%s policy:%s template:%s count:%s" % (
                 receipt, self.manager.data['name'],
                 self.data.get('template', 'default'), len(batch)))
 
-    def send_data_message(self, message, session):
+    def send_data_message(self, message):
         if self.data['transport']['type'] == 'asq':
             queue_uri = self.data['transport']['queue']
-            return self.send_to_azure_queue(queue_uri, message, session)
+            return self.send_to_azure_queue(queue_uri, message)
 
-    def send_to_azure_queue(self, queue_uri, message, session):
-        queue_service, queue_name = StorageUtilities.get_queue_client_by_uri(queue_uri, session)
+    def send_to_azure_queue(self, queue_uri, message):
+        queue_service, queue_name = StorageUtilities.get_queue_client_by_uri(queue_uri)
         return StorageUtilities.put_queue_message(queue_service, queue_name, self.pack(message)).id
 
 


Test patch:
diff --git a/tools/c7n_azure/tests/cassettes/NotifyTest.test_notify_though_storage_queue.yaml b/tools/c7n_azure/tests/cassettes/NotifyTest.test_notify_though_storage_queue.yaml
--- a/tools/c7n_azure/tests/cassettes/NotifyTest.test_notify_though_storage_queue.yaml
+++ b/tools/c7n_azure/tests/cassettes/NotifyTest.test_notify_though_storage_queue.yaml
@@ -5,77 +5,107 @@ interactions:
       Accept: [application/json]
       Accept-Encoding: ['gzip, deflate']
       Connection: [keep-alive]
-      Content-Type: [application/json; charset=utf-8]
-      User-Agent: [python/2.7.13 (Windows-10-10.0.17134) requests/2.18.4 msrest/0.4.29
-          msrest_azure/0.4.31 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python]
+      User-Agent: [python/2.7.15 (Windows-10-10.0.17134) msrest/0.6.1 msrest_azure/0.5.0
+          azure-mgmt-storage/3.0.0 Azure-SDK-For-Python]
       accept-language: [en-US]
     method: GET
-    uri: https://management.azure.com/subscriptions/ea42f556-5106-4743-99b0-c129bfa71a47/providers/Microsoft.Storage/storageAccounts?api-version=2017-10-01
+    uri: https://management.azure.com/subscriptions/ea42f556-5106-4743-99b0-c129bfa71a47/providers/Microsoft.Storage/storageAccounts?api-version=2018-07-01
   response:
     body:
       string: !!binary |
         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
-        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
+        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
+        Q/C//0v+H3lf3ZTQNgAA
     headers:
       cache-control: [no-cache]
       content-encoding: [gzip]
-      content-length: ['2501']
+      content-length: ['2067']
       content-type: [application/json; charset=utf-8]
-      date: ['Wed, 27 Jun 2018 16:22:55 GMT']
+      date: ['Wed, 31 Oct 2018 20:26:17 GMT']
       expires: ['-1']
       pragma: [no-cache]
       strict-transport-security: [max-age=31536000; includeSubDomains]
       vary: [Accept-Encoding]
       x-content-type-options: [nosniff]
-      x-ms-correlation-request-id: [5f3ef420-5fec-4d2a-8d03-71ccff27e22f]
-      x-ms-original-request-ids: [292fa6c5-4d7b-416e-8095-abc6604bd77f, c9ef87d7-a36d-485b-993a-c7fb57ff7824,
-        473c5c8c-d133-474f-903c-5d774f476403, d9731f05-1c10-4072-b341-7bbc770b4288]
-      x-ms-ratelimit-remaining-subscription-reads: ['14999']
-      x-ms-request-id: [5f3ef420-5fec-4d2a-8d03-71ccff27e22f]
-      x-ms-routing-request-id: ['WESTUS2:20180627T162255Z:5f3ef420-5fec-4d2a-8d03-71ccff27e22f']
+      x-ms-correlation-request-id: [a5423d39-51fb-4ba1-9318-cd08187a86f4]
+      x-ms-original-request-ids: [bbccab3f-b4d9-4763-b1e7-a70935f98f3b, 59ce00ba-b5e9-4a6d-b61c-d307b7705fe5,
+        fb0071d1-394a-4947-aafe-5be146512aeb]
+      x-ms-ratelimit-remaining-subscription-reads: ['11999']
+      x-ms-request-id: [a5423d39-51fb-4ba1-9318-cd08187a86f4]
+      x-ms-routing-request-id: ['WESTUS2:20181031T202617Z:a5423d39-51fb-4ba1-9318-cd08187a86f4']
     status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Connection: [keep-alive]
+      Content-Length: ['0']
+      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.15; Windows 10)]
+      x-ms-date: ['Wed, 31 Oct 2018 20:26:17 GMT']
+      x-ms-version: ['2018-03-28']
+    method: PUT
+    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testnotify
+  response:
+    body: {string: !!python/unicode ''}
+    headers:
+      content-length: ['0']
+      date: ['Wed, 31 Oct 2018 20:26:20 GMT']
+      server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0]
+      x-ms-request-id: [a5517c14-7003-0127-5b57-71a474000000]
+      x-ms-version: ['2018-03-28']
+    status: {code: 204, message: No Content}
+- request:
+    body: null
+    headers:
+      Connection: [keep-alive]
+      Content-Length: ['0']
+      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.15; Windows 10)]
+      x-ms-date: ['Wed, 31 Oct 2018 20:26:20 GMT']
+      x-ms-version: ['2018-03-28']
+    method: DELETE
+    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testnotify/messages
+  response:
+    body: {string: !!python/unicode ''}
+    headers:
+      content-length: ['0']
+      date: ['Wed, 31 Oct 2018 20:26:20 GMT']
+      server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0]
+      x-ms-request-id: [a5517db0-7003-0127-2857-71a474000000]
+      x-ms-version: ['2018-03-28']
+    status: {code: 204, message: No Content}
 - request:
     body: null
     headers:
@@ -83,8 +113,8 @@ interactions:
       Accept-Encoding: ['gzip, deflate']
       Connection: [keep-alive]
       Content-Type: [application/json; charset=utf-8]
-      User-Agent: [python/2.7.13 (Windows-10-10.0.17134) requests/2.18.4 msrest/0.4.29
-          msrest_azure/0.4.31 keyvaultmanagementclient/0.40.0 Azure-SDK-For-Python]
+      User-Agent: [python/2.7.15 (Windows-10-10.0.17134) msrest/0.6.1 msrest_azure/0.5.0
+          azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python]
       accept-language: [en-US]
     method: GET
     uri: https://management.azure.com/subscriptions/ea42f556-5106-4743-99b0-c129bfa71a47/resources?api-version=2015-11-01&$filter=resourceType%20eq%20%27Microsoft.KeyVault%2Fvaults%27
@@ -102,16 +132,16 @@ interactions:
       content-encoding: [gzip]
       content-length: ['295']
       content-type: [application/json; charset=utf-8]
-      date: ['Wed, 27 Jun 2018 16:22:55 GMT']
+      date: ['Wed, 31 Oct 2018 20:26:21 GMT']
       expires: ['-1']
       pragma: [no-cache]
       strict-transport-security: [max-age=31536000; includeSubDomains]
       vary: [Accept-Encoding]
       x-content-type-options: [nosniff]
-      x-ms-correlation-request-id: [3d63fa73-abf5-4a05-b4be-47965f519d2c]
-      x-ms-ratelimit-remaining-subscription-reads: ['14999']
-      x-ms-request-id: [3d63fa73-abf5-4a05-b4be-47965f519d2c]
-      x-ms-routing-request-id: ['WESTUS2:20180627T162255Z:3d63fa73-abf5-4a05-b4be-47965f519d2c']
+      x-ms-correlation-request-id: [eac299ea-d2a9-480d-a4d8-c27938aef2dc]
+      x-ms-ratelimit-remaining-subscription-reads: ['11999']
+      x-ms-request-id: [eac299ea-d2a9-480d-a4d8-c27938aef2dc]
+      x-ms-routing-request-id: ['WESTUS2:20181031T202621Z:eac299ea-d2a9-480d-a4d8-c27938aef2dc']
     status: {code: 200, message: OK}
 - request:
     body: null
@@ -119,158 +149,90 @@ interactions:
       Accept: [application/json]
       Accept-Encoding: ['gzip, deflate']
       Connection: [keep-alive]
-      Content-Type: [application/json; charset=utf-8]
-      User-Agent: [python/2.7.13 (Windows-10-10.0.17134) requests/2.18.4 msrest/0.4.29
-          msrest_azure/0.4.31 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python]
-      accept-language: [en-US]
+      User-Agent: [python/2.7.15 (Windows-10-10.0.17134) msrest/0.6.1 msrest_azure/0.5.0
+          networkmanagementclient/2.2.1 Azure-SDK-For-Python]
     method: GET
-    uri: https://management.azure.com/subscriptions/ea42f556-5106-4743-99b0-c129bfa71a47/providers/Microsoft.Storage/storageAccounts?api-version=2017-10-01
+    uri: https://management.azure.com/subscriptions/ea42f556-5106-4743-99b0-c129bfa71a47/providers/Microsoft.Network/locations/eastus/operations/ea42f556-5106-4743-99b0-c129bfa71a47?api-version=2018-06-01
   response:
-    body:
-      string: !!binary |
-        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
+    body: {string: !!python/unicode "{\r\n  \"error\": {\r\n    \"message\": \"Operation
+        273dd4dc-7c0b-4408-a9fa-fd0472050ac0 not found.\",\r\n    \"details\": []\r\n
+        \ }\r\n}"}
     headers:
       cache-control: [no-cache]
-      content-encoding: [gzip]
-      content-length: ['2501']
+      content-length: ['119']
       content-type: [application/json; charset=utf-8]
-      date: ['Wed, 27 Jun 2018 16:22:56 GMT']
+      date: ['Wed, 31 Oct 2018 20:26:26 GMT']
       expires: ['-1']
       pragma: [no-cache]
+      server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0]
       strict-transport-security: [max-age=31536000; includeSubDomains]
-      vary: [Accept-Encoding]
       x-content-type-options: [nosniff]
-      x-ms-correlation-request-id: [9d5a2f43-c684-42dc-bc4f-0ab5e0ee5027]
-      x-ms-original-request-ids: [d01e4816-5ab8-4fa6-b3dc-7d9254182c05, 9656409e-9a43-478b-a5bd-6d707d3a494f,
-        70045e11-7c17-44bd-a456-c36ea8683b88, f57e8f8f-e27e-4679-b62d-90b3049bde08]
-      x-ms-ratelimit-remaining-subscription-reads: ['14997']
-      x-ms-request-id: [9d5a2f43-c684-42dc-bc4f-0ab5e0ee5027]
-      x-ms-routing-request-id: ['WESTUS2:20180627T162256Z:9d5a2f43-c684-42dc-bc4f-0ab5e0ee5027']
-    status: {code: 200, message: OK}
+      x-ms-correlation-request-id: [391d661f-91a0-438e-a82b-a71c4da1f570]
+      x-ms-ratelimit-remaining-subscription-reads: ['11999']
+      x-ms-request-id: [a684c696-c088-4d3b-a59c-4915ef7face5]
+      x-ms-routing-request-id: ['WESTUS2:20181031T202627Z:391d661f-91a0-438e-a82b-a71c4da1f570']
+    status: {code: 404, message: Not Found}
 - request:
     body: null
     headers:
-      Accept: [application/json]
-      Accept-Encoding: ['gzip, deflate']
       Connection: [keep-alive]
       Content-Length: ['0']
-      Content-Type: [application/json; charset=utf-8]
-      User-Agent: [python/2.7.13 (Windows-10-10.0.17134) requests/2.18.4 msrest/0.4.29
-          msrest_azure/0.4.31 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python]
-      accept-language: [en-US]
-    method: POST
-    uri: https://management.azure.com/subscriptions/ea42f556-5106-4743-99b0-c129bfa71a47/resourceGroups/test_storage/providers/Microsoft.Storage/storageAccounts/cctstoragey6akyqpagdt3o/listKeys?api-version=2017-10-01
-  response:
-    body:
-      string: !!binary |
-        H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
-        VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR2/z
-        6+ajR9/jX15ki/yjR/ht96PRR5dZucafTxb3d5Y78180n/xE+ennBw/v//SzYmf+U7ufT35qOpkt
-        Pn8wuf6Jh5MH5YOzs4vz4tW3T37i7b3r4y9++tMmf/Pd+fonLr+aFLOf+PTu+bJ+UF7ez/KfvPzy
-        q4vPPqMuVnm9KJqmqJaEw0fP1mX50S8ZdVDZo3YGleJ+Vrw9XpZn9y+K+uL3njxdv/y9H168KN+d
-        7l7/Pl/84NsP3v5e94rf+8Hv/YP5yevpJ+tvfzKr333+7bPvHP/U6ScPi3cPZ/tv7z6vz14cfLne
-        W+T3Hq6/8+CnZseDqHz/l/w/zRmIASABAAA=
-    headers:
-      cache-control: [no-cache]
-      content-encoding: [gzip]
-      content-type: [application/json]
-      date: ['Wed, 27 Jun 2018 16:22:56 GMT']
-      expires: ['-1']
-      pragma: [no-cache]
-      server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
-          Microsoft-HTTPAPI/2.0']
-      strict-transport-security: [max-age=31536000; includeSubDomains]
-      vary: [Accept-Encoding]
-      x-content-type-options: [nosniff]
-      x-ms-correlation-request-id: [62c2a1cf-f473-42df-a352-1e2081cdcc98]
-      x-ms-ratelimit-remaining-subscription-writes: ['1199']
-      x-ms-request-id: [7a57f108-2851-40f3-bf90-1156fe79c16a]
-      x-ms-routing-request-id: ['WESTUS2:20180627T162257Z:62c2a1cf-f473-42df-a352-1e2081cdcc98']
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Connection: [keep-alive]
-      Content-Length: ['0']
-      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.13; Windows 10)]
-      x-ms-date: ['Wed, 27 Jun 2018 16:22:56 GMT']
+      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.15; Windows 10)]
+      x-ms-date: ['Wed, 31 Oct 2018 20:26:21 GMT']
       x-ms-version: ['2018-03-28']
     method: PUT
-    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testcc
+    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testnotify
   response:
-    body: {string: ''}
+    body: {string: !!python/unicode ''}
     headers:
       content-length: ['0']
-      date: ['Wed, 27 Jun 2018 16:22:57 GMT']
+      date: ['Wed, 31 Oct 2018 20:26:29 GMT']
       server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0]
-      x-ms-request-id: [acb475cc-2003-0115-7d33-0eddcf000000]
+      x-ms-request-id: [8ba0e0f1-8003-0079-2257-711122000000]
       x-ms-version: ['2018-03-28']
     status: {code: 204, message: No Content}
 - request:
-    body: '<?xml version=''1.0'' encoding=''utf-8''?>
-
-      <QueueMessage><MessageText>eJzlUz1PIzEQ7fdXRK7Z9ZEASajoKE7XXnNC0WDPbgyOx7HHQXsR/51dO4nY4iSor7I0fh8zz+NjJUApSo7F/UwArFfr5c1zfavnUN/o9aqG5QrqxWreLpbXt/rHEsXV7MLZGP0tWsDOkMsUa09CXCrHSjAN559KpIjhQdMOjGsU7UT1NCIZd94C48jW2EKynBV8MBQM95stgsYwXs/zBfc+gx2xaftSCuCip8DFcJ8wZciW2cd7KZXiyBSgw/4OXvu9h07zgpoMHHoJ2LwZp+ktNg5ZMkZWamIGcS+q97ES0/MLqhzriDOum5VOZqeZC8yTNaov/QSMlIIqQn/T4PaK/eEyqYMdnuXqolW3FOoJqIjHnOT/mGn1VKB4wLzTLllbVq9ke0nmnKZS5/yuiyt0I+b4/pn1GCj5s+1mErglBacdFgOYt2owDmBTnAzxy6hAkVpufmL/e2TLrFFQ5R/JYb6ogvH5CeVXvpWcdBjlpD/pAx3M8IBR/tNefp6/xPcBcDFN2Q==</MessageText></QueueMessage>'
+    body: !!python/unicode mock_body
     headers:
       Connection: [keep-alive]
       Content-Length: ['619']
-      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.13; Windows 10)]
-      x-ms-date: ['Wed, 27 Jun 2018 16:22:57 GMT']
+      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.15; Windows 10)]
+      x-ms-date: ['Wed, 31 Oct 2018 20:26:30 GMT']
       x-ms-version: ['2018-03-28']
     method: POST
-    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testcc/messages
+    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testnotify/messages
   response:
-    body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><QueueMessagesList><QueueMessage><MessageId>a5690bbd-61a8-4f7e-b311-ec4aea3d54e6</MessageId><InsertionTime>Wed,\
-        \ 27 Jun 2018 16:22:57 GMT</InsertionTime><ExpirationTime>Wed, 04 Jul 2018\
-        \ 16:22:57 GMT</ExpirationTime><PopReceipt>AgAAAAMAAAAAAAAAbh4RHDMO1AE=</PopReceipt><TimeNextVisible>Wed,\
-        \ 27 Jun 2018 16:22:57 GMT</TimeNextVisible></QueueMessage></QueueMessagesList>"}
+    body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><QueueMessagesList><QueueMessage><MessageId>b42e6de5-4777-47f5-8f08-865742f7314c</MessageId><InsertionTime>Wed,
+        31 Oct 2018 20:26:30 GMT</InsertionTime><ExpirationTime>Wed, 07 Nov 2018 20:26:30
+        GMT</ExpirationTime><PopReceipt>AgAAAAMAAAAAAAAAiH0UAlhx1AE=</PopReceipt><TimeNextVisible>Wed,
+        31 Oct 2018 20:26:30 GMT</TimeNextVisible></QueueMessage></QueueMessagesList>"}
     headers:
       content-type: [application/xml]
-      date: ['Wed, 27 Jun 2018 16:22:57 GMT']
+      date: ['Wed, 31 Oct 2018 20:26:29 GMT']
       server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0]
-      x-ms-request-id: [acb475ed-2003-0115-1a33-0eddcf000000]
+      x-ms-request-id: [8ba0e864-8003-0079-0258-711122000000]
       x-ms-version: ['2018-03-28']
     status: {code: 201, message: Created}
+- request:
+    body: null
+    headers:
+      Connection: [keep-alive]
+      User-Agent: [Azure-Storage/1.3.0-1.3.0 (Python CPython 2.7.15; Windows 10)]
+      x-ms-date: ['Wed, 31 Oct 2018 20:26:30 GMT']
+      x-ms-version: ['2018-03-28']
+    method: GET
+    uri: https://cctstoragey6akyqpagdt3o.queue.core.windows.net/testnotify/messages
+  response:
+    body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><QueueMessagesList><QueueMessage><MessageId>b42e6de5-4777-47f5-8f08-865742f7314c</MessageId><InsertionTime>Wed,
+        31 Oct 2018 20:26:30 GMT</InsertionTime><ExpirationTime>Wed, 07 Nov 2018 20:26:30
+        GMT</ExpirationTime><PopReceipt>AgAAAAMAAAAAAAAAsukIFFhx1AE=</PopReceipt><TimeNextVisible>Wed,
+        31 Oct 2018 20:27:00 GMT</TimeNextVisible><DequeueCount>1</DequeueCount><MessageText>eJzlUz1v2zAQ3fUrDM6R2NhJbWfqliHo2iUIjAt5ktnQPJo8OlCM/PdKpG1YQ4B27kTg+D7uHo/HSoBSlByLh5kAWK/Wy7vX+l7Pob7T61UNyxXUi9W8XSxv7/W3JYqb2YWzMfqfaAE7Qy5TrD0JcakcK8E0nM+VSBHDD007MK5RtBPVy4hk3HkLjCNbYwvJclbwwVAw3G+2CBrDeD3PF9z7DHbEpu1LKYCLngIXw33ClCFbZh8fpFSKI1OADvvv8NbvPXSaF9Rk4NBLwObdOE3vsXHIkjHytfrJEOJeVJ9jJabX36hytCPWuG5W8LPT3AXmyRrVl54CRkpBFaGPNDi+YX+4TOtgh2e5umjVLYV6AiriMaf5v+ZavRQoHjDvtkvWlhUs+V7SOSeq1DnD2+IK3Yg5fl6zHgMlf7bdTEK3pOC0y2IA81YNxgFsipMhfhoVKFLLzRP2v0a2zBoFVf6THOaLKhifn1H+zfeSkw6jnPQnfaCDGR4xyi/t5fX8Jb4/KLJRfw==</MessageText></QueueMessage></QueueMessagesList>"}
+    headers:
+      cache-control: [no-cache]
+      content-type: [application/xml]
+      date: ['Wed, 31 Oct 2018 20:26:30 GMT']
+      server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0]
+      x-ms-request-id: [a55184b9-7003-0127-5d58-71a474000000]
+      x-ms-version: ['2018-03-28']
+    status: {code: 200, message: OK}
 version: 1
diff --git a/tools/c7n_azure/tests/test_notify.py b/tools/c7n_azure/tests/test_notify.py
--- a/tools/c7n_azure/tests/test_notify.py
+++ b/tools/c7n_azure/tests/test_notify.py
@@ -14,6 +14,7 @@
 from __future__ import absolute_import, division, print_function, unicode_literals
 
 from azure_common import BaseTest, arm_template
+from c7n_azure.storage_utils import StorageUtilities
 
 
 class NotifyTest(BaseTest):
@@ -41,7 +42,12 @@ def test_notify_schema_validate(self):
     @arm_template('keyvault.json')
     def test_notify_though_storage_queue(self):
         account = self.setup_account()
-        queue_url = "https://" + account.name + ".queue.core.windows.net/testcc"
+
+        # Create queue, make sure it is empty
+        queue_url = "https://" + account.name + ".queue.core.windows.net/testnotify"
+        queue, name = StorageUtilities.get_queue_client_by_uri(queue_url)
+        queue.clear_messages(name)
+
         p = self.load_policy({
             'name': 'test-notify-for-keyvault',
             'resource': 'azure.keyvault',
@@ -59,3 +65,7 @@ def test_notify_though_storage_queue(self):
         })
         resources = p.run()
         self.assertEqual(len(resources), 1)
+
+        # Pull messages, should be 1
+        messages = StorageUtilities.get_queue_messages(queue, name)
+        self.assertEqual(len(messages), 1)