"Environment id is null or empty" error when posting an Adaptive Card to Teams as the flow bot with a Card Type Id - microsoft-teams

Using an Azure Logic App to post an adaptive card in a channel, I receive an error message "Environment id is null or empty" if I include the Card Type Id property.
I've had a similar issue in Power Automate, but it is usually solved by updating or replacing the connector.
When I change the connector in Logic Apps, the task is reset and I need to re-enter all properties.

I have reproduced issue from my side and below are steps I followed,
Initially created logic app as shown below,
I got same error like you,
"code": 400, "message": "Environment id is null or empty"
Instead of using dynamic content from Get User Profile (V2), written expression as shown below,
outputs('Get_user_profile_(V2)')?['Id']
Logic app ran successfully as shown below,

Related

How do I send a message to myself with PowerAutomate?

I am developing a PowerAutomate flow,
I want to use the function "post message in chat or channel",
I can send messages to anyone in "one to one" private chats but not on the private chat i have with myself.
Has somebody found a way to message himself via power automate?
I can't create it as a "new chat" in PA because it says users cannot be duplicate.
Then i figured out i had to find the ID of the chat with myself.
I tried using the microsoft graph api to retrieve the id from "me/chats" but the chat with myself is not shown.
I tried many different filters and expansions with no success.
I also tried analyzing the id itself and discovered that, in the case of "one to one" chats, it's made of {the sender id} and {the receiver id}
I then tried constructing an id that contains 19:{myuserid}_{myuserid}#{domain} but it responds that there is no record.
I tried many combinations,
thanks for the help.
Currently it is not possible to send messages/cards to self chat as the self-chat id is not exposed.You can raise suggest this feature at Microsoft Teams Feedback portal.
Please not that if you post card using below settings it will send a card to you but as a separate chat with Power Automate.

Unable to trigger issuing_authorization.request webhook via Stripe CLI

I'm running into issues trying to test authorization of virtual cards I'm issuing on my test Stripe account. I've been able to successfully create card holders and virtual cards and am currently trying to write webhooks to handle real-time authorizations.
I find the webhook trigger doesn't let me specify a card-holder or a card to try to authorize and whenever I run the trigger, I get a response like this:
Setting up fixture for: cardholder Running fixture for: cardholder Setting up fixture for: card Running fixture for: card Trigger failed: Request failed, status=400, body={ "error": { "code": "cardholder_phone_number_required", "doc_url": "https://stripe.com/docs/error-codes/cardholder-phone-number-required", "message": "You cannot create a card without aphone_numberon file for cardholder: ich_1L9RhDIK0uyzlLuMaZHgCfzP. Please see https://stripe.com/docs/issuing/3d-secure.", "type": "invalid_request_error" } }
The step to reproduce this on my end was to simply run the forwarding command and the issuing_authorization.request commands as described by the documentation. I ran these two commands on separate terminals:
stripe listen --forward-to localhost:7787/v1/virtual-cards/stripe/hook
stripe trigger issuing_authorization.request
I'm not sure of what to do, especially since all card-holders I've created thus far have phone numbers and I have no way of specifying a card holder when triggering via the CLI, or editing one on my dashboard.
I'll appreciate any help I can get or any nudge in the right direction for solving this issue. Thanks in advance for your time!

Microsoft Flow/Teams Adaptive Card

Tried using the new adaptive cards feature in Teams that is supposedly live in Flow. Copied the JSON from the Adaptive Card builder online, replaced some strings with string responses from a Form hook. Don't see any reason why I would be seeing this error:
"error": {
"code": "MissingOrInvalidBotAdaptiveCardRequest",
"message": "The specified Teams flowbot adaptive card request is missing or invalid."
}
I have the flow bot enabled in the team and channel that I want the card to display in. I can't figure out what's gone wrong. Everything is entered as a string, right? It would be nice if they updated the documentation on both adaptive card posts and mentions in the Flow/Teams documentation. I'm happy to clarify, I just don't know what to include.
I didn't have the permissions Flow needed in Teams. Once I resolved that and a syntax issue, everything worked out fine. Flow gives the same error whether you don't have permission or there's a syntax/schema problem in your post.

Luis: Access denied due to invalid subscription key

I am facing following issue when i try to update application on Luis using following request:
https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/app-id-here
header:
Ocp-Apim-Subscription-Key:paid-subscription key
body:
{
"name": "Name of luis app",
"description": "string"
}
I am getting following error:
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
I am using paid subscription from Azure portal with westus region. Still facing this issue.
However, This key works when I try to get top scoring intent using following request:
https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/luis-app-id?subscription-key=subscription-key-azure&timezoneOffset=-360&q=hi
This is really weird as sunscription key works for GET request but not for PUT or POST request.
Any suggestions?
PS: I am using paid subscription key.
The (subscription) keys created with a Cognitive Service LUIS resource in Azure Portal, even when added to with Assign resource in luis.ai, can only be used for runtime queries on a defined app.
The authoring endpoints on LUIS Programmatic APIs v2.0 - to create and manage apps and their elements - can only be used with the Authoring Key available in the luis.ai portal.
More information can be found in Authoring and query prediction endpoint keys in LUIS
It looks like you have two issues you are working thru here.
First, the API you are trying to post to should read "https://[location].api.cognitive.microsoft.com/luis/api/v2.0/apps/{appId}/publish". From the looks of it, you are missing the 'publish' at the end of your API call.
Second, the paid subscription key needs to be added to your LUIS app. Can you confirm it has been added? If not, follow these steps to do so:
Click Manage => Keys and Endpoints.
Next, click 'Assign resource'.
A window will pop up allowing you to select the tenant, subscription, and the key to use.
Click OK.
Click 'Publish' to make the newly generated endpoint accessible.
Make sure you add subscription primary key value in my request and also make sure you have associated your API with the product which you used the Primary key

Google Translate API always returning 'Daily Limit Exceeded'

I'm trying to get the google translate API up and running. On the getting started guide, it gives the following example: https://www.googleapis.com/language/translate/v2/detect?key={MyAppId}&q=google+translate+is+fast
I just want to get this working for now, so I'm just trying to get it working view via a browser post, so I created a testing web application (screenshot):
and grabbed the API key, replaced the sample URL's key with my API key. I get the following response:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceeded",
"message": "Daily Limit Exceeded"
}
],
"code": 403,
"message": "Daily Limit Exceeded"
}
}
I should also note, that I have signed my account up with the billing option (I plan on using the service quite a bit), so I should have no issues at the moment.
I'm obviously doing something wrong, but I don't know what. Any suggestions?
For getting data translated you have to enable billing and have to register your credit/debit card.After you register your card 1$ will be deducted and then you will be able to use your URL
I did it recently and it worked fine.
I am also working on translating project nowadays.
Let me know if you need any kind of help on this topic
Ishan
I would first confirm that the Translate API is enabled under the "APIs" link in the Cloud Console - if it is not enabled, that effectively sets the quota to zero and may produce a similar message.
If the API is enabled, then the following link describes how to check the usage limits for your project:
https://developers.google.com/translate/v2/pricing
You can change the quotas manually:
to complement #Ishan Arora, after you add the credit card info, go to the console, enter into the project, a message will popup asking to setup the billing account for your project, if you want to get ride of the error, just select "set project into the billing account" drop down list.
On my case, the same problem was caused by credit card expiration

Resources