0

I'm trying to connect to a Azurewebapp, and once I have checked that network is correctly configured (I'm able to connect to unsecured resources) I'm stuck with the "Active Directory Oauth" option in the HTTP connector (API webapp inside Azure).

enter image description here

The response is an internal error:

enter image description here

Are parameters correctly filled?

And also I have been able to connect with endpoint throug Postman Authentication Oauth 2.0. ID Token ins unchecked in App Registration.

enter image description here

Martín Alcubierre
  • 4,341
  • 1
  • 27
  • 27

1 Answers1

1

Have created logic app as shown below, enter image description here

Get Bearer Token is a http action. Using this request getting bearer token. enter image description here Authentication Type: Basic

User name : Client Id

Password : Client Secret

Added one more Http action with name, Get Data action is using access token from previous step to call api as shown below, enter image description here

Able to call api using bearer token and getting data. enter image description here

vijaya
  • 1,525
  • 1
  • 2
  • 6
  • What's the authorization url? Which format does it have? – Martín Alcubierre Nov 12 '22 at 20:43
  • login.microsoftonline.com/{tenant}/oauth2/v2.0/token? – Martín Alcubierre Nov 12 '22 at 20:56
  • It genetates token but I is not completelly valid: 022-11-13 09:51:50.912 +00:00 [Error] Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler: Exception occurred while processing message.System.UnauthorizedAccessException: IDW10201: Neither scope or roles claim was found in the bearer token.at Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilderExtensions.<>c__DisplayClass3_1. – Martín Alcubierre Nov 13 '22 at 09:52
  • OK, got it. but with "AllowWebApiToBeAuthorizedByACL" : true and removing scope requirement from controller. Following: https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-protected-web-api-verification-scope-app-roles?tabs=aspnetcore – Martín Alcubierre Nov 13 '22 at 10:50