Atom format is not supported error from Table Storage API when exposed from API Mangement using JWT

Occasional Visitor

Hi All,

 

I'm getting below error when tring to get data from Azure Table storage API and exposed via Azure API management with JWT token authentication:

{
    "version""1.0",
    "encoding""utf-8",
    "error": {
        "code""AtomFormatNotSupported",
        "message": {
            "@xml$lang""en-US",
            "#text""Atom format is not supported.\nRequestId:b9a4c169-e002-0016-0694-8f113e000000\nTime:2021-08-12T16:09:34.7251321Z"
        }
    }
}
.\nRequestId:b9a4c169-e002-0016-0694-8f113e000000\nTime:2021-08-12T16:09:34.7251321Z"
        }
    }
}
 
Below is the Trace from APi Management:
api-inspector (0.220 ms)
    {
    "request": {
        "method": "GET",
        "url": "https://apimaskingdemotesting.azure-api.net/",
        "headers": [
            {
                "name": "sec-ch-ua",
                "value": "\"Chromium\";v=\"92\",\" Not A;Brand\";v=\"99\",\"Google Chrome\";v=\"92\""
            },
            {
                "name": "Ocp-Apim-Subscription-Key",
                "value": "0903836dd2cb484092287520251a36fb"
            },
            {
                "name": "Table",
                "value": "employees"
            },
            {
                "name": "sec-ch-ua-mobile",
                "value": "?0"
            },
            {
                "name": "Sec-Fetch-Site",
                "value": "cross-site"
            },
            {
                "name": "Sec-Fetch-Mode",
                "value": "cors"
            },
            {
                "name": "Sec-Fetch-Dest",
                "value": "empty"
            },
            {
                "name": "X-Forwarded-For",
                "value": "82.12.207.182,165.225.81.18"
            },
            {
                "name": "Cache-Control",
                "value": "no-cache, no-store"
            },
            {
                "name": "Content-Type",
                "value": "application/json"
            },
            {
                "name": "Accept",
                "value": "application/json"
            },
            {
                "name": "Accept-Encoding",
                "value": "gzip,deflate,br"
            },
            {
                "name": "Accept-Language",
                "value": "en-US,en;q=0.9"
            },
            {
                "name": "Host",
                "value": "apimaskingdemotesting.azure-api.net"
            },
            {
                "name": "Referer",
                "value": "https://apimanagement.hosting.portal.azure.net/"
            }
        ]
    }
}

api-inspector (0.003 ms)
    {
    "configuration": {
        "api": {
            "from": "/",
            "to": {
                "scheme": "https",
                "host": "storagedemoaccountapi.table.core.windows.net",
                "port": 443,
                "path": "/employees",
                "queryString": "",
                "query": {},
                "isDefaultPort": true
            },
            "version": null,
            "revision": "1"
        },
        "operation": {
            "method": "GET",
            "uriTemplate": "/"
        },
        "user": "-",
        "product": "-"
    }
}

cors (0.021 ms)
    "Origin header was missing or empty and the request was classified as not cross-domain. CORS policy was not applied."

set-variable (0.007 ms)
    {
    "message": "Expression was successfully evaluated.",
    "expression": "context.Request.Headers.GetValueOrDefault(\"Table\")",
    "value": "employees"
}

set-variable (0.009 ms)
    {
    "message": "Context variable was successfully set.",
    "name": "TableName",
    "value": "employees"
}

set-header (0.007 ms)
    "Header `Table` was removed."

set-header (0.003 ms)
    "Header `Ocp-Apim-Subscription-Key` was removed."

set-header (0.002 ms)
    "Header `Sec-Fetch-Site` was removed."

set-header (0.002 ms)
    "Header `Sec-Fetch-Mode` was removed."

set-header (0.004 ms)
    "Header `Sec-Fetch-Dest` was removed."

set-header (0.002 ms)
    "Header `Accept` was removed."

set-header (0.002 ms)
    "Header `Accept-Encoding` was removed."

set-header (0.002 ms)
    "Header `Referer` was removed."

set-header (0.002 ms)
    "Header `X-Forwarded-For` was removed."

set-header (0.003 ms)
    {
    "message": "Expression was successfully evaluated.",
    "expression": "string version = \"2017-11-09\"; return version;",
    "value": "2017-11-09"
}

set-header (0.006 ms)
    {
    "message": "Specified value was assigned to the header (see below).",
    "header": {
        "name": "x-ms-version",
        "value": "2017-11-09"
    }
}

set-backend-service (0.004 ms)
    {
    "message": "Expression was successfully evaluated.",
    "expression": "\nstring TableName = context.Variables.GetValueOrDefault<string>(\"TableName\");\nreturn String.Format(\"https://storagedemoaccountapi.table.core.windows.net/{0}\", TableName);\n",
    "value": "https://storagedemoaccountapi.table.core.windows.net/employees"
}

set-backend-service (0.015 ms)
    {
    "message": "Backend service URL was changed.",
    "oldBackendServiceUrl": "https://storagedemoaccountapi.table.core.windows.net/employees",
    "newBackendServiceUrl": "https://storagedemoaccountapi.table.core.windows.net/employees",
    "request": {
        "url": "https://storagedemoaccountapi.table.core.windows.net/employees"
    }
}

authentication-managed-identity (0.326 ms)
    {
    "message": "Obtaining managed identity token using clientId:e4fbf6d9-69a3-402d-b76d-0282cf7bf4b3 AAD Authority:https://login.windows.net/6d46c658-6b23-4c73-9b7b-b61ef7ffd1af for https://storage.azure.com/ audience succeeded.",
    "errorResponse": null
}

authentication-managed-identity (0.003 ms)
    {
    "message": "Managed identity token is added to Authorization header."
}
Backend(6.880 ms)↑ Back to top
forward-request (0.068 ms)
    {
    "message": "Request is being forwarded to the backend service. Timeout set to 300 seconds",
    "request": {
        "method": "GET",
        "url": "https://storagedemoaccountapi.table.core.windows.net/employees",
        "headers": [
            {
                "name": "Host",
                "value": "storagedemoaccountapi.table.core.windows.net"
            },
            {
                "name": "sec-ch-ua",
                "value": "\"Chromium\";v=\"92\",\" Not A;Brand\";v=\"99\",\"Google Chrome\";v=\"92\""
            },
            {
                "name": "sec-ch-ua-mobile",
                "value": "?0"
            },
            {
                "name": "x-ms-version",
                "value": "2017-11-09"
            },
            {
                "name": "Cache-Control",
                "value": "no-cache, no-store"
            },
            {
                "name": "Content-Type",
                "value": "application/json"
            },
            {
                "name": "Accept-Language",
                "value": "en-US,en;q=0.9"
            },
            {
                "name": "Authorization",
                "value": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Im5PbzNaRHJPRFhFSzFqS1doWHNsSFJfS1hFZyIsImtpZCI6Im5PbzNaRHJPRFhFSzFqS1doWHNsSFJfS1hFZyJ9.eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzZkNDZjNjU4LTZiMjMtNGM3My05YjdiLWI2MWVmN2ZmZDFhZi8iLCJpYXQiOjE2Mjg3MTk3NjcsIm5iZiI6MTYyODcxOTc2NywiZXhwIjoxNjI4ODA2NDY3LCJhaW8iOiJFMlpnWUZoMm8rN1lo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0OxtgIYg3AKJpqz2CwsZ1hACVxJBHThGZio1YAw"
            },
            {
                "name": "X-Forwarded-For",
                "value": "13.91.254.72"
            }
        ]
    }
}

forward-request (6.812 ms)
    {
    "response": {
        "status": {
            "code": 415,
            "reason": "Unsupported Media Type"
        },
        "headers": [
            {
                "name": "Transfer-Encoding",
                "value": "chunked"
            },
            {
                "name": "x-ms-request-id",
                "value": "67e7e4eb-d002-000d-5a6e-8f2f3d000000"
            },
            {
                "name": "x-ms-version",
                "value": "2017-11-09"
            },
            {
                "name": "X-Content-Type-Options",
                "value": "nosniff"
            },
            {
                "name": "Content-Type",
                "value": "application/xml;charset=utf-8"
            },
            {
                "name": "Date",
                "value": "Thu, 12 Aug 2021 11:38:39 GMT"
            },
            {
                "name": "Server",
                "value": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0"
            }
        ]
    }
}
Outbound(0.261 ms)↑ Back to top
xml-to-json (0.111 ms)
    "XML-to-JSON policy was applied. Original Content-Length header was removed as its value was invalidated. Content-Type header was set to 'application/json'."

transfer-response (0.150 ms)
    {
    "message": "Response has been sent to the caller in full"
}
 
0 Replies