9 Replies Latest reply on Mar 30, 2021 4:54 AM by Kevin Rexroad

    Application Integration to Azure Cosmos

    Kevin Rexroad Active Member

      I fairly new to Informatica and learning as I go, but I have been asked to establish a connection between Informatica Application Integration and an Azure Cosmos database using the REST APIs. In Azure, I have a simple Cosmos database created with 3 items in it. I'm attempting to make a simple call to pull those three records.


      I first got the call working in Postman, so I had an understanding of how it would work, but in my attempts to implement in Informatica I cannot get the authorization token formatted correctly. I just get the following generic error message:




         <message>The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get

      fri, 25 oct 2019 14:33:56 gmt


      ActivityId: 274ce0ec-1144-4a58-b394-75f5088c837f, Microsoft.Azure.Documents.Common/2.7.0</message>



      I'm thinking my problem is one of three things, but I can't figure out how to know which one.


      1. Should I be Decoding or Encoding the Key from Azure Cosmos database? My Postman pre-code is Encoding, but not sure which encoding I should be doing in Informatica. Seems to me I should be Decoding.


      2. The "\n" in the concatenated string do not appear to be producing the same values as the Postman call. In Postman I'm dumping the value to the console and I can see the value in the Informatica call. I have tried hard CR in the Source of Informatica, but still not working. Is there someway to concat an ASCII value here like we can do with the "&amp;"?


      3. Finally, when I go to encrypt the signature and encode it for sending back to Azure, I'm not sure it is being encoded correctly. Base64 or Base64Url? encode-for-uri? or something else? Is there better documentation for these functions other than the quick short description in the function dialog box?


      If anyone has any insight, let me know.


      Code Sample:

      Code Sample