Azure Integration account AS2 sync MDN issue - integration

I am performing a POC using Azure Integration account AS2. I have an issue with sending the sync MDN Message back.
I am using Mendelson to perform the testing
Sending a signed and encrypted message to Azure Logic App works
Decoding the message and validation works
Sending the sync MDN back is giving an error in Mendelson Issue
Message send back by Logic App

Found the issue:
Response Body should be:
"body": "#base64ToString(body('Decode_AS2_message')?['OutgoingMdn']?['Content'])"

Related

Azure APIM custom connector returns empty body response in Power Apps

I’m going through the wizard to create a custom connector in Power Apps to call a simple Get operation in Azure APIM. I can call the API fine using Postman, Fiddler and CURL. However, when I try to test the connector using the test tab I’m getting a 200 OK but the response body is empty:
It’s worth mentioning that this issue, with empty response body, occurs only for APIs in Azure APIM. If I hit the backend API, hosted in Azure App Service, without going through Azure APIM I’m receiving a response body. I have tested with other public APIs on the internet which works fine as well. The problem with empty response seems to have something to do with the integration between Power Apps and Azure APIM.
Any assistance is highly appreciated.
With the help of Azure Application Insights logs, I discovered that this is ralated to CORS. To resolve the issue, I added the https://flow.microsoft.com to Azure APIM CORS policy to allow calls from the PowerApps test console to come through, like so:

Custom portal: server-side sign-in

We have been using APIM since 2018. As the legacy portal has been deprecated and we wanted more freedom, we decided to skip the default APIM portal altogether, and to embed the APIM API methods in our own website, using Postman as the documentation portal.
Most of the methods are straightforward, but it's not clear how to sign-in the user? We can, of course, fetch their statistics and API keys, but how do we know they are who they claim they are?
The code in the self-hosted portal in GitHub is more client-side oriented.
EDIT. From the usersService.ts module it appears that GET /identity with the Authorization header made of Basic and base64-encoded pair of userId:password is to be invoked.
But I keep getting:
{
"error": {
"code": "AuthenticationFailedInvalidHeader",
"message": "Authentication failed. The 'Authorization' header is provided in an invalid format."
}
}
Changing Basic to Bearer predictably yields InvalidAuthenticationToken.
OK, solved (with the help of Microsoft support who sent a screenshot of the method being invoked on their side).
It seems that the method is not to be invoked from management.azure.com like all the other methods. Nope. It has to be invoked from the Management API URL that can be found in the Management API section of your APIM in Azure.
Curiously, the management API toggle does not even have to be on.
Your GET request should be like this:
https://my_apim_instance.management.azure-api.net/subscriptions/my_subscription_id/resourceGroups/my_resource_group/providers/Microsoft.ApiManagement/service/my_apim_instance/identity?api-version=2019-12-01
Now cue in the ever-helpful posters with ever-useful post-solution advice.

sending email using PutEmail processor in Nifi - Failing with Error

I am trying to send email using PutEmail processor in Nifi. Below is the configuration of the processor.
However, emails are not sent and getting this error. It would be great help if addressed.
#techno_mad - I would trust the error message. Test with a known working smtp combo with 100% confirmed smtp access. I also suggest, paste the nifi error as text, not an image. Your peers need to visit the link and are likely not typing it out.
https://support.google.com/mail/thread/5621336?hl=en
Test enabling “Access for less secure apps” (which just means the
client/app doesn’t use OAuth 2.0 - https://oauth.net/2/) for the
account you are trying to access. It's found in the account settings
on the Security tab, Account permissions (not available to accounts
with 2-step verification enabled):
https://support.google.com/accounts/answer/6010255?hl=en

Sending a message from FCM Console not working for Web Tokens

I am implementing Web Push Notification in an application and I have successfully registered the client app with GCM. I have the subscription object that contains the endpoint that looks like this.
"https://android.googleapis.com/gcm/send/dV4lSfI5J6Q:APA91bEU28F9YG5qNr3xSjvYlH2Mh1GPgiqMaRcjandHbpfqnVyAeZxqoE31OXYq4yzW2_vrkn74YHdgsITZP_6SELO8-xHf1hylquJefJdY85-Xx9AWTAPP9H6kfq7CKp23dsoQHbH
I read and found out that we need to use a third party library like web-push to send push using this endpoint to the clients because the payload needs to be encrypted according to spec. My objective is to send notifications to all my users, web + mobile, at once, using Firebase Console's Notification feature.
Is there a way to send push to web clients using Firebase console or to convert the GCM endpoint to an FCM token?
Update: If I try to use Firebase console to send push the token generated above, I get the following error.
As per testing this out, for some reason, registration tokens for Web are not working or allowed in the Firebase Console. Only tokens for Android and iOS do:
The request could still proceed where the console would show that it is sent/complete, but there wouldn't be any messages received.

How to get mosync app to use RESTful APi and json payload

I have written a mosync application that interacts with a REST we service. I am using the AMDownload package. Wat is the right way to send the json payload required by the REST API?
The HTTP 400 Bad Request perhaps happens because the MoSync Android runtime messes up the URL, causing the server to return this error. Alternatively, perhaps the MoSync Android runtime considers the URL to be wrong, and sends back the HTTP 400 Bad Request.
Is it possible for you to test on an Android device? To see if the result is the same.
Also, is it possible to find the exact URL/data sent to the server? Perhaps using some network monitor software. If you have access to the server, can you see the request it receives? If you would enter the same request in a client like the Firefox RESTClient, do you get the same response?