vanderby / AlexaToAzureAPI

Sample code for hosting an API on Azure that is authenticated with Azure AD and accessed from the Alexa service
2 stars 2 forks source link

Error 'We were unable to link AccountLinking at this time' #1

Closed devedse closed 5 years ago

devedse commented 6 years ago

Hi,

I ran through the tutorial here: https://blogs.msdn.microsoft.com/premier_developer/2018/01/25/amazon-alexa-skills-authenticated-by-azure-active-directory-and-backed-by-an-azure-function/

All steps went fine but I keep running into the following message when I try to link my account:

image

When checking Fiddler I see the following URL being passed back to Alexa:

GET https://layla.amazon.com/api/skill/link/M2LS5OGWNNO6KM?code=AQABAAIAAADX8GCi6Js6SK82TsD2Pb7rVjXLFvfsX143Ojf4dAnmO6VQZ8StiX6xAQLjKlppKGhcMiJT6HFv5bA41HIC80frRmfuAxNIqwCxaq6VQ5TELtLofIa3o7NiyMnBK11a3hQiGeTwVpH039Wcu67gLZf91lbPUs5nIlAQ-KHkqtydcJ0Hg3qbr3XP1EYXtIcn22qPZxd58bIWWW4TgFeKXOIAMQt12kvZDMeba0YYM4iFtxJgNoHzdVQZOH2Gu1row9JTFQhCoYMAEOi9LvAqqvfsL5yuVTT0vZMUtFly_m3yXEeLXf3Cbxfof9siGRU52YG-iMuXyIYEF_TCKbxClpFluqybE4ouKlJ31qcCL3n-zTBByGxchZnbouE1lpd1dem38kX_Viuoe2LNwltIjxRT9p1gVAFsTMOkD9ejQ1xaaOEXnF6nPIy-xzqqKsCv_6sV9fjfHU85KXKDImhXbujKCzBNkSYhQ0Cky6gRySZA4zybDW43vNmj4gh8BHj-WveVUq7Ijt_sPDmbuzt9TaqQ0e8aaSEYFot16zVxC0ViDEk00RptUnCR7u937DmArYrXZ3Y4hoYxzUhCiCEO3lHOsJzAfwbbcQ0-9w2o5LW-5MRXkvmVW4cr4fLa07scI-oA8pLJOjCT5LSBMhdwTcpnFpRLul2XE90N9ab8k35m7ELuO6uO-vRqTVkfxzlLY0fYyxUgChUoTDXKXF1nDTxTYMedmHhRHo7eTFun0TK-T5uGDAJmJRQ0WnEc5nZNKu9qEmdE3pCsJwRL6jYXd0L8IKV2WVb4ZuEEU6dCLerXRqiSWgkaHrvRyDZ4WzbJv_FoRXOnX5C86yn80ZH2GOFzIAA&state=A2SAAEAELwyJTwPxxwnt7CNTut4Ck8B0FPT0h51nzGnKTGap9mjmVshjFqQVHiPemKC9htbuD81lUnBjXRaAiEdVCWL5VnTEKFTTxbKG1lNv1t6wNcn1iiC9WnU-v3QRjGzNRyGTlUrVvVZYdBBbLkOGYHMo3jDUo7CNrJC_wp91hSHikH-7sVB8V2rnstB--z2vn9CvsKFK-bQzgrxjUOFeCYareidlHQHzjiggyTk3-kXCTxD0QbtaZ2L3rvaFpzWutM-vLw7BT19Lh1H7mCsnuwzn96BuJBiskEfcAsvH-UrX1Z8H3-IP8uUVWOFCQ4VPxXhGU5ZwEAdSmqqL4jxdJWE1A3tcjgE2021U3AD2aMPQuEshYWnJXgIm406pwgr_Gfz8efy5fAOHOtGscoAScb7PMZpJ0fZmSpNV32XEePOGoSnBCgjZHdkU-8Z8sglOHHAPbLlINoLSBTHigGJBtxRySNpYLxD0XGmk7I8HMg6zJc35oQA9w5m2ob7YXEj8R4JWZit_I7QrasiFemrHaU_oanE0NJoM7afQlatrDdygIO9YIBic2Vafz1vWjtd7suQ8znuAo5ur879ZQlHCJp9TCk7LyK4UPVo4NoqdvjGqoVVIvfDrtBKUIrAhmKQkDailFMV&session_state=f93a00bb-53a5-4472-882f-1b2029b1520c HTTP/1.1
Host: layla.amazon.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://websso.********.com/adfs/ls/?client-request-id=3d5995c0-a6a4-4c17-bca2-710243c5059a&wa=wsignin1.0&wtrealm=urn%3afederation%3aMicrosoftOnline&wct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lK0jbuQtQFns6ADwB8t7M_WAxfVp5uzRG7pfYpqlCHXe530_BL76_IdotW9d-_6_sWDi4cX_1xiT6_OkP7y3Sv_5Zcf9r79-G_m9-iDi9-u2nIIo9A99meUTiRts7fahpHMx6W8ZuFBCmDigUBIk6F-1B8zXfKLu9iru9hnb138-Pb_5PvF9fuAIFmc6OCAfUhwXQC6DLH-Fw2&cbcxt=&username=*********.com&mkt=&lc=
Accept-Encoding: gzip, deflate, br
Accept-Language: nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,af;q=0.6,cs;q=0.5,de;q=0.4,pl;q=0.3,ru;q=0.2
Cookie: ubid-main=135-3828312-4363116; x-wl-uid=1ADjEgi5bajMCwDpM/lPgSPYEO5burO7ZEmEfUj5zglJkXP3GdPUjVADnrHprtkAz0ZZg1Yb1TPN1sdhCuYtE8A==; csrf=380843792; session-id-time=2082787201l; session-id=142-3988364-7529739; x-main="vdoDUJqJbBndfhFKZb8aR?KJqsz43KpblRZBa9yfJFwLeaeW4bhRmGlNJfM5ozup"; at-main=Atza|IwEBIDRNeyV8MihMlhJWKEucxuUKuCObgkhHDjVS6qBjzTo2LPFnn7wRVHxWK5ZUvAmX2-wORAOpNxhEFhP5iZ5TZrz-M0VkG-YkVDofFO3u14WBsJr0O8pqd3VlGOmq3mN_wsFYsaKJDlXEyQgckYtns41PDALBu3h8cKPn7NIoonh1S5XFylSwmDHBoczZRt3sD18Ry3zLcS7mnPS90y0YJA50m4LWrIKUcCOWKReGWKbkE3dshNOhF1Fx7iiPSPn5rhVnVmTrKb6p7CIAaInlq8GvhRwcSde1_gqXnzAra3AujwzOHIfFM19lb7mgj8vsX1etyllfnV0TxbOU_WttVRYjDxjlKPsClBtPV_3A0lttt7OHC5EuYYc1MTmNN577vYSyaLHc0iA5ikCmkklKeiju; sess-at-main="NbpwCzh423vNvWBCj2XetoAc2Ur4Tlomo8OOpsb7So8="; session-token="nxNLKa34DU4FGNCJD2yCfylG8fwFysvdnUIz1ld9eQqpxIlDB1QVACa5vbndn3vC9h0r8r+xW6zsOxRcEKcThNsDRBiH9c5c9CxqTwhhMCeJI2Evf+pvge0heCoJgJX2mpHB9fakmWnpZ850S/VQeQVl67TzgXQSAWqdO8qBB4CwAvCMKAd/WC8LT1eUSyI2/H6PHh5lyj7nExFkcoBVJXhwpPv2jcNPSLm2T3oBaso="
vanderby commented 5 years ago

Sorry for the late reply. Account Linking is the most frustrating part. Post-Man is useful in tracking down these issues as you can call the Authorization URI directly and see the error message being returned to get more information that Amazon's uninformative "We were unable to link at this time" page.

vanderby commented 5 years ago

Closing for lack of activity.