locked
REST API service - Access denied ? RRS feed

  • Question

  • I am following this article ti get hang of REST API using BizTalk 2013 R2.
    As instructed in the article logged in and followed by creating a Key and followed the documentation.

    https://www.codeproject.com/Articles/730961/Invoking-Bing-Maps-REST-API-through-an-Orchestrati

    This are configuration of my Send Port :

    URI : http://dev.virtualearth.net/REST/v1/Locations
    
    <BtsHttpUrlMapping>
        <Operation Name="GetGeoCode" Method="GET" Url="?query={userAddressQuery}&amp;key={BingMapsKey}&amp;o=xml" />
    </BtsHttpUrlMapping>
    The adapter failed to transmit message going to send port "SP_BingMaps:REST" with URL "http://dev.virtualearth.net/REST/v1/Locations". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.Net.WebException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''.
    <?xml version="1.0" encoding="utf-8"?>
    <Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/search/local/ws/rest/v1">
    	<Copyright>Copyright © 2018 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.</Copyright>
    	<BrandLogoUri>http://dev.virtualearth.net/Branding/logo_powered_by.png</BrandLogoUri>
    	<StatusCode>401</StatusCode>
    	<StatusDescription>Unauthorized</StatusDescription>
    	<AuthenticationResultCode>NoCredentials</AuthenticationResultCode>
    	<ErrorDetails>
    		<string>Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation.</string>
    	</ErrorDetails>
    	<TraceId>793e6b6d4e9044319d2b12b61acbd26f|BN20121764|7.7.0.0|</TraceId>
    	<ResourceSets />
    </Response>".
    What am I doing wrong ? 


    Reason101

    Monday, January 22, 2018 10:23 PM

Answers

  • Have you created the api key for the Bing Maps?

    Clearly the call to the Bing Api is not validating your Get  call to the api.

    Ensure following 

    1) You have created the key to the Bing Api 

    2) You have to set the key as promoted property so that you can use it in the variable mapping.

    3) That the key is populated properly.


    Mandar Dharmadhikari

    • Proposed as answer by Daniel Rosa Tellez Wednesday, January 24, 2018 1:24 PM
    • Marked as answer by Reason101 Wednesday, January 24, 2018 3:12 PM
    Tuesday, January 23, 2018 3:02 AM
    Moderator