user9596637
user9596637

Reputation:

In Azure logic app i am getting DirectApiAuthorizationRequired

In azure logic app, I am getting the following error

{
    "error": {
        "code": "DirectApiAuthorizationRequired",
        "message": "The request must be authenticated only by Shared Access scheme."
    }
}

but as for as I know SAS token for authorization will append to url so no need to pass any authorization.

But i am unable to solve the above problem.

Upvotes: 7

Views: 21107

Answers (4)

Zstack
Zstack

Reputation: 4733

Also make sure you have the url between double quotes.

curl "https://production.centralus.logic.azure.com/.............." 

Upvotes: 9

when Http triggered logic app exposed via API manager need to remove 'Authorization' header before calling the Back end can use API manager policies for this

Upvotes: 0

Kermit754
Kermit754

Reputation: 343

I have exactly the same issue. The application that sends towards my logic apps sets the following header (Unfortunately, I cannot modify this application)

authorization Basic Og==

Although I use the HTTP trigger URL that includes the SAS token, I still get back the following

{
    "error": {
        "code": "DirectApiAuthorizationRequired",
        "message": "The request must be authenticated only by Shared Access scheme."
    }
}

There seem to be two ways to drop the header : * Using APIM (API manager) * Using Function proxy

https://devkimchi.com/2017/12/07/securing-sas-token-from-azure-logic-apps/ https://www.bruttin.com/2017/07/07/secure-serverless-architecture.html

Choice between both is depending on load & cost [function proxy seems to be the most affordable if it is just for removing headers]

Upvotes: 1

Ahmed Magdy
Ahmed Magdy

Reputation: 814

you need to copy the full URL generated by your HTTP trigger that URL includes the SAS token for your API as a parameter in the URL it self.

otherwise you can`t send auth headers to your HTTP trigger

Upvotes: 0

Related Questions