Resolving Authorization Errors: Configuring BizTalk for Basic Authenticated REST API Connectivity

Introduction

When attempting to connect to a Basic Authenticated REST API through BizTalk using a WCF Web HTTP adapter, you may encounter the following error:

Error

System.Net.WebException: The HTTP request is unauthorized with the client authentication scheme 'Basic'. The authentication header received from the server was ''.

{

    "code": "Unauthorized",

    "message": "Unauthorized",

    "type": "tag:xyx,2020:error/Unauthorized",

    "instance": "tag:xyz,2020:***/3333333333333333"

}

Resolution

Configure the outbound headers as shown below.


Conclusion

By following these steps and configuring the outbound headers as instructed, you can overcome the authorization error and establish a successful connection to the Basic Authenticated REST API through BizTalk using the WCF Web HTTP adapter.


Comments

Popular posts from this blog

Error: Number of included segments do not match

REST API Calls with Query Parameters in BizTalk: A Step-by-Step Guide

EDI X12 Trading partner configuration in BizTalk