getting information from specific runs of logic apps - azure-logic-apps

We have logic apps running in azure.
We can query some details of past runs in azure log analytics.
Log analytics does not seem to contain any of the output from each task in the logic app, even though i can see this in the logic app history.
Is there a way to query the data/payloads/output from each task in the logic app?

Yes, you can get logs of Logic apps, I have followed below process:
Firstly, open your Log analytics workspace
In general tab open workspace summary as below:
then click on add as below:
Then click on Logic apps managemnet(preview):
The click on create:
Then give details and click on create:
Then open your created as below:
Then, I have created a workflow in logic app and then I opened Diagnostic settings as below:
Then give important details as below:
open your Log analytics workspace
In general tab open workspace summary as below:
Then you will get output as below:
When you click on chart you will get information like below:
If you click on row of LogicApp(table in above display)
Alternatively in work summary in log analytics, click on logs and then You can the below kql query to get logs and you can export it using export option as below:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.LOGIC"
| where OperationName has "workflowRunCompleted"
You can also send a email of payload (example SO-thread) to check your runs or you can create an alert on each run in logicapp.

Related

How can you obtain the full URL of a HTTP triggered Logic App in the Azure Portal, if you can't use the designer?

How can you obtain the full URL of a HTTP triggered Logic App in the Azure Portal, if you can't use the designer?
Usually if I create a logic app with the HTTP trigger, after the first time I save it, the "Designer" has the full URL, including the sig, and even an option to "Copy Url", e.g.
https://prod.northeurope.logic.azure.com:443/workflows/.../paths/invoke?...&sig=xxxxxxx
But if I create a logic app in the "Code view" with multiple triggers, e.g. one for GET, one for POST, I can't switch to the "Designer".
So how can I get the full URL?
... without using e.g. PowerShell and the Az cmdlets, e.g.
Get-AzLogicAppTriggerCallbackUrl
-ResourceGroupName $(LogicAppResourceGroupName)
-Name $(LogicAppName-ProcessData)
-TriggerName "manual"
Actually Logic app http trigger endpoint URL is a sas URL with below format:
https://<request-endpoint-URI>sp=<permissions>sv=<SAS-version>sig=<signature>
And you don't have dev tool, the efficient ways are the REST API:listcallbackurl and the Az command:Get-AzLogicAppTriggerCallbackUrl.
The rest api description provides a simple way to test the API with Try it button, just log in without additional auth token generation.
Also Azure Portal provides the Azure Cloud Shell to use the PowerShell and Bash command to manage Azure resources.
If you can use the Run Trigger button and select the Run with payload buttons in the code view, you can get the full url from the pane that pops up, with a convenient button to copy the full url.

How to retrieve "Runs Completed" count of more than one Logic App

I have a bunch of Azure Logic Apps in my architecture and want to figure the cumulative sum of total runs completed in all the Logic Apps in my architecture. So far, I could only configure a single Logic App to the chart but I am wondering if there is a way to get a cumulative count in a single shot.
Any suggestions are much appreciated. Thanks.
For this requirement, we can use Azure Log Analytics workspace.
We need to create a Log Analytics workspace first. Please refer to this tutorial to create it.
Then enable "Log Analytics" when you create the logic app and choose the Log Analytics workspace which we created above.
After that, we can see the running log(include the cumulative sum of total runs completed) in the Log Analytics workspace. We can see them by go to the Log Analytics workspace and click "Workspace summary".
If you have already created many logic apps and do not want to create them again, you can follow the steps below:
Also create the "Log Analytics workspace" as the first solution above.
Then install Logic Apps Management solution in it.
After that, go to your logic app and set the logs to send to Log Analytics.
By the way, the logs in Log Analytics workspace will be a little bit of a delay, so please wait a moment for the logs.(In my test, I wait for more than 25 mins).

Congigure logic app failure alerts using azure ARM template

I have added the alert rule and action group manually in the Azure portal to send mail whenever it fails.
Is it possible to create these things using the Azure resource manager template?
Yes, this tutorial will help you create the alert using ARM template. You can refer to the "simplestaticmetricalert.json" and "simplestaticmetricalert.parameters.json" in this tutorial and replace the parameters in json with your parameters. Then use PowerShell or Azure CLI to deploy the template.
By the way, if you are confused about some parameters in "simplestaticmetricalert.parameters.json", you can use this command below
az monitor metrics alert show [--ids]
[--name]
[--resource-group]
[--subscription]
to show the properties of the alert you have created before for your reference when you edit the new template.

How to delete a project from Google Cloud Console

It seems that, from Google Cloud Console there is no way to delete a project.
Note: As of 2013-09-19 this is no longer an issue because
Google had fixed it.
- Now you can click on the check box and then
click delete
As 2017 approaches, Raptor's answer pretty much nailed it, but here is a screenshot and the basic steps to delete a project from the google cloud platform.
Go to console.cloud.google.com
Select your project (from drop-down on top nav-bar)
Select IAM & Admin (from hamburger menu on top-left nav-bar)
Click Settings in the left-side-bar nav.
Click SHUT DOWN (image shows DELETE PROJECT)
Enter text per instructions to confirm project shutdown.
UPDATE 11-2020
After clicking SHUT DOWN, you'll see the final dialog popup with instructions on what to type to confirm.
Try to change back to old console design.. You can find delete button there.
This is the old url
https://code.google.com/apis/console/
Then you click in the left sidebar on the project name, you'll have a "delete" link :)
Deleting your project from old console is no longer available!
So in the new console go to Billing and Settings and delete your project from there.
And you are done. Project will get deleted after 7 days waiting period!
You must first disable billing before deleting any project. See link https://developers.google.com/console/help/#deletingaproject
Since the console design has changed, many of the given solutions here won't apply anymore. Here is what Google help says here: https://support.google.com/cloud/answer/6251787?hl=en&ref_topic=6158848
To shut down a project:
Go to the Cloud Platform Console.
Open the console menu Gallery Menu on the top left and select IAM & Admin, then select All projects.
Find the name or project ID of the project you want to shut down, then
click DELETE PROJECT. A confirmation screen describing what will
happen appears.
To confirm, enter your project ID and click Shut down.
Shutting down a project stops all billing and traffic serving, shuts
down any Google Cloud Platform App Engine applications, and terminates
all Compute Engine instances. All project data associated with Google
Cloud and Google APIs services becomes inaccessible.
After a 7-day waiting period, the project and associated data are
permanently deleted from the console.
As of July 2017 the waiting period has increased:
After a 30-day waiting period, the project and associated data are permanently deleted from the console.
As of Dec 30, 2017, this appears to be different (yet again). I did the following.
Logon to the Google Cloud Console, Select IAM & Admin then Settings (from hamburger menu on top-left nav-bar). This is a cascading menu. After choosing that I saw the following.
On the bottom left of the screen is a button/link labeled Manage resources, click on it.
After clicking on it, I saw the following screen, on which I selected the project name I wanted to delete and clicked the Delete ICON/button.
Then I was asked if I wanted to "SHUTDOWN" the project and to do so I had to enter the project ID number, so I did and then clicked on the SHUTDOWN button/link.
Hope this helps someone. The others answers did help me out but were not the exact steps I had to follow.
Important Note: The terms "Shutting Down" a project and "Deleteting a Project" seem to mean the same thing, so if you stumble across something that says "Shutdown the project" you have likely come across another way to "delete the project".
open cmd in google cloud(which can be found after clicking in your project in right top corner) and type
gcloud projects delete [..your-project-id..]
Login with your Google Account
Navigate to this page: https://console.cloud.google.com/cloud-resource-manager?organizationId=0
Select a single project
Click "DELETE" (on top, above projects table)
You may need to visit https://appengine.google.com/, select an application, then go to Administration -> Application Settings, scroll down half-way and click "Disable Application" under "Disable or Delete". One the next page you can also request permanent deletion.
Just found that Google doesn't allow you to delete project in old console anymore. For now, you need to click on project, then "Billing & Settings", you will find delete button there.
Deletion of projects is no longer available under the old Google Cloud Platform Console. To delete a project, open the latest console. Once done, you should be able to see a list of your projects as well as the delete icon(s) on the right side:
You must be a project owner to shut down a project.
It's July 2018, none of the above works. Here is what I spotted and successfully deleted un-needed projects.
https://cloud.google.com/go/getting-started/delete-tutorial-resources
You need to delete all the unwanted project(s) else will be billed regardless.
Answering the question after a long time its been asked. Hopefully it will help someone who is looking for it in 2022.
As per the documentation of creating and managing projects in google cloud. its a simple process.
Search for IAM & Admin in global search.
Once we click on IAM & Admin we will land up in a page as follows.
Go to settings page from the left menu
It will take us to the currently selected project's settings page. On top there is a shutdown button. Press that for deleting the project.
Please note as per the official documentation,
This method immediately marks a project to be deleted. A notification email will be sent to the user who initiated the delete operation and the Technical category contacts that are listed in Essential Contacts. If there's no contact in the Technical category, the fallback contact will not be notified. A project that is marked for deletion is not usable. If the project has a billing account associated with it, that association is broken, and isn't reinstated if the project delete operation is canceled. After 30 days, the project is fully deleted.
Once we press the shutdown button, GCP will show a popup as shown below.
As a confirmation GCP is asking for project id to be manually entered in the popup. Enter the project id with caution and press shutdown in the popup.
It will show the success message as show below.
That's it. Hope it will help someone.
[https://console.cloud.google.com/cloud-resource-manager?project=mapapp-229211][1]
This Will Help For Manage Google cloud projects
To delete projects created using Google cloud console, you can use the following method:
1: Create a dummy gmail account.
2: Add the dummy gmail account as an owner of the project.
3: Login into the dummy gmail account.
4: Accept your role as owner of the project.
5: Visit Cloud console.
5: Go to Cloud Console -> Permissions and delete the main user from the project.
NOTE: Other than Step 2, rest all the steps should be performed using dummy gmail account.
Step By Step to disable and request permanent deletion from Google Cloud Console and Google Appengine Project.
Step 1 - Navigate to appengine project and Click on Application Settings.
Step 2 - Scroll/Find the button to Disable Application. Click the button.
Step 3 - Click on "Disable Application Now"
Step 4 - Click on "Request Permanent Deletion". You will screen update showing the scheduled delete.
Step 5 - Navigate to Google Cloud Console. The status corresponding to the disabled/deleted project is shown as "Disabled" in red.
Go to Google Cloud Platform,
select the project & click "DELETE PROJECT" on top right corner.
https://cloud.google.com/appengine/docs/python/console/?csw=1#delete%5Fapp

Export CSV as portal user

I have a salesforce I export to CSV using a URL like this https://tapp0.salesforce.com/00OT00000014APi?export=1&enc=UTF-8&xf=csv following this blog post.
This works fine and is very fast when I run for a fully licenced user.
However when I try to call the same report export as a Gold Patner portal user I get an error "Insufficient Privileges"
I have marked the report as deployed.
Given all users access to the Report Folder
The user does have the correct sharing and profile rules setup to view the data in the report.
Going to just the report URL by itself works https://tapp0.salesforce.com/00OT00000014APi
It only fails when I try to export to CSV.
I DO reliase I am using an unsuported internal API call. But was wondering is there anyway portal users can export reports to CSV?
Not sure about through the UI, but this can be done through a SOQL query and portal users do have limited access to the API. Most, but not all, reports can be converted to SOQL queries to produce the same output.
For running your query, the easiest is probably to build a Visualforce page that is backed by an Apex controller that runs the query and outputs a CSV. Take a look at the contentType attribute on the apex:page tag. You can set things like application/vnd.ms-excel#contacts.xls to automatically export a data table to Excel. I didn't try, but it probably works with CSV too -- worst case is that you open in Excel first and save as CSV.
Also, if you don't mind portal users having to leave Salesforce to get their CSV, you might want to try Workbench, which is an app I built that allows for portal user login and helps you build the SOQL query for CSV export both through the SOAP and Bulk APIs.
Ok I found the problem
You need to go to Salesforce > Setup > Manage Users > Profiles
Then Click to Edit the RS_PortalUser profile
Click the checkbox next to “Run Reports” and “Export Reports”
Click save

Resources