Hi @Evangelizt ,
I am assuming it is a Azure function app you are referring to. If so
1. In your Azure function app make sure you have added CORS details of your powerapps portal URL.
To call function app from button click:
1. you can use ajax call in your custom javascript area
$(document).ready(function () {
$("#btnExternalCall").click(function (e) {
var serviceURL = "https://NAME_OF_AZURE_FUNCTION_GOES_HERE.azurewebsites.net/api/HttpTriggerCSharp1";
$.ajax({
url: serviceURL,
type: "GET",
xhrFields: {
withCredentials: true
},
crossDomain: true,
success: function (data) {
alert("Success: " + data);
},
error: function (ex) {
alert("Failure getting user token");
}
});
});
});
To avoid spamming:
In your Azure function app > you can enable the Authentication / Authorization and configure it to either Azure AD or Microsoft

Hope it helps.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.