{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/BillingCodeSamples/issues/6","labels_url":"https://api.github.com/repos/Azure/BillingCodeSamples/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Azure/BillingCodeSamples/issues/6/comments","events_url":"https://api.github.com/repos/Azure/BillingCodeSamples/issues/6/events","html_url":"https://github.com/Azure/BillingCodeSamples/issues/6","id":91311151,"number":6,"title":"401 unauthorized","user":{"login":"magaal","id":5382692,"avatar_url":"https://avatars.githubusercontent.com/u/5382692?v=3","gravatar_id":"","url":"https://api.github.com/users/magaal","html_url":"https://github.com/magaal","followers_url":"https://api.github.com/users/magaal/followers","following_url":"https://api.github.com/users/magaal/following{/other_user}","gists_url":"https://api.github.com/users/magaal/gists{/gist_id}","starred_url":"https://api.github.com/users/magaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magaal/subscriptions","organizations_url":"https://api.github.com/users/magaal/orgs","repos_url":"https://api.github.com/users/magaal/repos","events_url":"https://api.github.com/users/magaal/events{/privacy}","received_events_url":"https://api.github.com/users/magaal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-06-26T17:26:40Z","updated_at":"2015-08-04T16:14:28Z","closed_at":null,"body":"Hi - following the documentation, I may be missing something, but I keep getting 401 unauthorized errors. My config is below and I can't seem to find anything glaring about what I'm missing:\r\n\r\n    <configuration>\r\n      <appSettings>\r\n        <add key=\"ADALServiceURL\" value=\"https://login.microsoftonline.com\"/>             <!-- Service root URL for ADAL authentication service WITH NO TRAILING SLASH! -->\r\n        <add key=\"ADALRedirectURL\" value=\"http://yerpderp/\"/>                           <!-- Redirect URL for ADAL authentication service MUST MATCH YOUR AAD APP CONFIGURATION! -->\r\n        <add key=\"ARMBillingServiceURL\" value=\"https://management.azure.com\"/>            <!-- Service root URL for ARM/Billing service WITH NO TRAILING SLASH!  -->\r\n        <add key=\"TenantDomain\" value=\"REMOVED.onmicrosoft.com\"/>                         <!-- DNS name for your Azure AD tenant -->\r\n        <add key=\"SubscriptionID\" value=\"REMOVED\"/>          <!-- GUID of Azure Subscription that is trusting AAD tenant specified above -->\r\n        <add key=\"ClientId\" value=\"REMOVED\"/>                <!-- GUID for AAD application configured as Native Client App in AAD tenant specified above -->\r\n      </appSettings>\r\n\r\nConsole output:\r\n\r\n    Calling Usage service...\r\n    The remote server returned an error: (401) Unauthorized.\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/BillingCodeSamples/issues/comments/127662473","html_url":"https://github.com/Azure/BillingCodeSamples/issues/6#issuecomment-127662473","issue_url":"https://api.github.com/repos/Azure/BillingCodeSamples/issues/6","id":127662473,"user":{"login":"Robin2009","id":6648354,"avatar_url":"https://avatars.githubusercontent.com/u/6648354?v=3","gravatar_id":"","url":"https://api.github.com/users/Robin2009","html_url":"https://github.com/Robin2009","followers_url":"https://api.github.com/users/Robin2009/followers","following_url":"https://api.github.com/users/Robin2009/following{/other_user}","gists_url":"https://api.github.com/users/Robin2009/gists{/gist_id}","starred_url":"https://api.github.com/users/Robin2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robin2009/subscriptions","organizations_url":"https://api.github.com/users/Robin2009/orgs","repos_url":"https://api.github.com/users/Robin2009/repos","events_url":"https://api.github.com/users/Robin2009/events{/privacy}","received_events_url":"https://api.github.com/users/Robin2009/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T16:14:28Z","updated_at":"2015-08-04T16:14:28Z","body":"Hi everyone, from the downloaded data I found two records as shown below:\r\n\r\n---------1st one---------\r\nusageStartTime:       2015-06-02T00:00:00+00:00\r\nusageEndTime:        2015-06-03T00:00:00+00:00\r\nmeterName:             Compute Hours\r\nmeterCategory:        Virtual Machines\r\nunit:                          Hours\r\ninfoFields/meteredRegion: Japan West\r\nmeterSubCategory:  Standard_D2 VM (Windows)\r\n/infoFields/project :   MTBSb2JpbkNT(MyTest)\r\nquantity:                   318.366994\r\n\r\n---------2nd one---------\r\nusageStartTime:       2015-06-02T00:00:00+00:00\r\nusageEndTime:        2015-06-03T00:00:00+00:00\r\nmeterName:             Compute Hours\r\nmeterCategory:        Virtual Machines\r\nunit:                          Hours\r\ninfoFields/meteredRegion: Japan West\r\nmeterSubCategory:  Standard_D2 VM (Windows)\r\n/infoFields/project :   MTBSb2JpbkNT(MyTest)\r\nquantity:                   24\r\n\r\nI remember in the day June.2,  I first created a cloud service and named it with \"MyTest\", then I create several VMs. And two or three hours later I deleted all of the VMs, and then I recreated some VMs with the same old size and leave them running.\r\n\r\nHere I have some questions:\r\n1. Why I got two VM usage records for a same day? Especially they are of the same VM size? How many records will I get if I just delete some of running VMs but not all of them?\r\n2.For the number 318.366994 and 24, I wonder how they were calculated? \r\n3.From where I can find out the \"MTBSb2JpbkNT\" thing?  I'm quite sure that \"MyTest\" is the name of my cloud service, but I didn't remember I'd used such a name for anything else. So, what does the name \"MTBSb2JpbkNT\" refer to ?\r\n\r\nThanks for any of your ideas."}}