Q: Creating Azure Media Services AccesPolicy returns 200 OK and no usable info I'm trying to make a list of publish urls of my content in azure media servies.
I read that the first step is creating a Acces Policy.
In MSDN documentation it says that I'll get either an 201 Create response with Id and other parameters in response or an 301 Moved Permanently response in wich case I need to remake the request to the new url provided.
My problem is that I get 200 OK response with no usable info:
{
  "d": {
    "EntitySets": [
      "AccessPolicies",
      "Locators",
      "ContentKeys",
      "ContentKeyAuthorizationPolicyOptions",
      "ContentKeyAuthorizationPolicies",
      "Files",
      "Assets",
      "AssetDeliveryPolicies",
      "AssetFilters",
      "IngestManifestFiles",
      "IngestManifestAssets",
      "IngestManifests",
      "StorageAccounts",
      "Tasks",
      "NotificationEndPoints",
      "Jobs",
      "TaskTemplates",
      "JobTemplates",
      "MediaProcessors",
      "EncodingReservedUnitTypes",
      "Operations",
      "StreamingEndpoints",
      "Channels",
      "Programs",
      "Filters"
    ]
  }
}

My code: 
public void Create()
        {
            if (string.IsNullOrWhiteSpace(Name))
            {
                Name = Guid.NewGuid().ToString();
            }
            string accessPolicyCreateRequestPayloadFormat = @"{0} ""Name"": ""{1}"", ""DurationInMinutes"": ""{2}"", ""Permissions"":""{3}""  {4}";
            string requestBody = string.Format(CultureInfo.InvariantCulture, accessPolicyCreateRequestPayloadFormat, "{", Name, DurationInMinutes.TotalMinutes, (int)Permissions, "}");

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format(CultureInfo.InvariantCulture, "{0}AccessPolicies", _context.WamsEndpoint));
            request.Method = HttpVerbs.Post;
            request.ContentType = RequestContentType.Json;
            request.Accept = RequestContentType.Json;
            request.Headers.Add(RequestHeaders.XMsVersion, RequestHeaderValues.XMsVersion);
            request.Headers.Add(RequestHeaders.Authorization, string.Format(CultureInfo.InvariantCulture, RequestHeaderValues.Authorization, _context.AccessToken));
            request.Headers.Add(RequestHeaders.DataServiceVersion, RequestHeaderValues.DataServiceVersion);
            request.Headers.Add(RequestHeaders.MaxDataServiceVersion, RequestHeaderValues.MaxDataServiceVersion);
            request.ContentLength = Encoding.UTF8.GetByteCount(requestBody);

            using (StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
            {
                streamWriter.Write(requestBody);
            }


            using (var response = (HttpWebResponse)request.GetResponse())
            {
                switch (response.StatusCode)
                {
                    case HttpStatusCode.MovedPermanently:
                        _context.CheckForRedirection();
                        Create();
                        break;
                    case HttpStatusCode.Created:
                        using (Stream responseStream = response.GetResponseStream())
                        {
                            using (StreamReader streamReader = new StreamReader(response.GetResponseStream(), true))
                            {
                                var returnBody = streamReader.ReadToEnd();
                                JObject responseJsonObject = JObject.Parse(returnBody);
                                var d = responseJsonObject["d"];
                                Id = d.Value<string>("Id");
                                DurationInMinutes = TimeSpan.FromMinutes(d.Value<double>("DurationInMinutes"));
                                Permissions = (AccessPolicyPermission)d.Value<int>("Permissions");
                                Name = d.Value<string>("Name");
                                Created = d.Value<DateTime>("Created");
                                LastModified = d.Value<DateTime>("LastModified");
                            }
                        }
                        break;
                    default:
                        Console.WriteLine(response.StatusDescription);
                        break;
                }

            }
        }

