We have scim provisioning setup within a enterprise app. However we're currently having to run a scheduled task to restart it.
We want to create a logic app to do it for us at a set time. Any tips on this would be appreciated.
We have tried the following:
POST /servicePrincipals/{servicePrincipalId}/synchronization/jobs/{jobId}/restart
We have a service principal setup with a client secret for access.
Restart SCIM Provisioning Job via Logic App
You can firstly set a recurrence trigger as below:
Then you can add the http action:
Fill all the detailers (herders ,tokens) and post the url.
By this way you can do your requirement.
Related
On Azure Cloud Portal I have one App Service Plan and under that I have one App service in which I have created some Deployment Slots, you can refer the below screen shot.
I have provided traffic % as per the requirement, now what happening is when I am triggering a request to my main App Service which is "wa-45210-jira-stg1-win" then it is routing through properly but when others are trying to trigger the request to same App service then it is getting redirected to other deployment slots like "wa-45210-jira-stg1-win-test". Please refer the screen shot below
Here the expectation are it should redirected to the desired app service for which the request has been triggered so that I can have dedicated deployment slots for particular environment.
I think traffic is getting divided because of the traffic % defined. If one app service is occupied then automatically the request will get redirected to other deployment slot which is not expected.
Can anyone suggest me What should I do in order to achieve this?
My goal is to create some deployment slots or something like that in one single app service so that I can manage Dev, Test & Stage environment related stuff in one App service and therefore I can save the cost.
Can anyone suggest me What should I do in order to achieve this? My
goal is to create some deployment slots or something like that in one
single app service so that I can manage Dev, Test & Stage environment
related stuff in one App service and therefore I can save the cost.
Yes, we can achieve the above requirement . To make sure that you have selected the correct target deployment slot which need to be trigger.
For example:-
Also make sure that ,
production is your target slot and that all settings in the source slot are setup exactly as you want them in production before swapping
an app from a deployment slot to production.
For complete configuration please refer this MICROSOFT DOCUMENTATION|Set up staging environments in Azure App Service
For more information please refer this MS Q&A as suggested by #ajkuma-MSFT.
I want to create a web app with node.js where users can schedule tasks that are executed on a specific time entered by the user.
I was thinking to use azure-webjobs or azure-functions for executing said tasks. I understand that scheduling in the azure portal is possible, however I couldn't find an API to schedule a webjob or function programmatically (for example using the Azure REST API).
Is it possible to schedule a azure-webjob or azure-function programmatically?
Azure WebJobs provide a more or less hidden API inside of KUDU called WebJobs API. This API is REST based webservice and it can be used to manage your jobs programmatically.
There are API endpoints available for the Azure WebJob which will be used for triggering the WebJob.
See the following documentation link for details on the list of available endpoints: https://github.com/projectkudu/kudu/wiki/WebJobs-API
Check this article: How to manage Azure WebJobs programmatically?
Also see this article might be helpful.
I have a situation :
Developing and Deploying the HttpTrigger based logicApp using visual Studio
Deploying to resource group changes the URL
Need to find out the URL to use as a webhook in service bus event
The webhook looks as follows
If I redeploy without deleting the logicapp it retains the previous URL
But when I delete the logic app and deploy it generates the new URL
Please guide me how to find the URL of the http trigger so that I can bind it to my service bus webhook. Or is there any way to retain the previous url even if I delete and deploy the logicapp .
I am doing the delete/deploy/reploy operations in my dev/sit/qas environment , as I am new to logic App so am not sure what step I am missing and if some understanding issue i have.
Or is there any way to retain the previous url even if I delete and deploy the logicapp .
No, it's impossibble.
When you delete the logic app then deploy or deploy to new resource group, it will create a new logic app. So it will generate a new url.
After you create the endpoint, you can trigger the logic app by sending an HTTPS POST request to the endpoint's full URL. Logic apps have built-in support for direct-access endpoints. Please refer to this article.
I have setup a Service Connections within Azure DevOps to my Azure Subscription. It uses a certificate to connect. When I create a new pipeline and select the task Azure App Service Deploy.
In the drop down box for Azure Subscription I see nothing under Available Azure Service Connections, but I see my various Azure Subs under Available Azure Subscriptions.
Anyone Know what this could be? Is there some permission I am missing?
I have been looking about online and cannot really see anything.
You probably need to run your agent on a different type of virtual machine, please see Picture 1 below.
Try selecting a different OS and add a new task based on your selected vm. Also note that your service connection may not be available for the selected task as you can see in Picture 2 and Picture 3.
*Assuming you have already enabled pipeline permissions from the project settings in your repo.
Hope it helps.
If you are talking about below in the UI, select the connection name you assigned in the Azure subscription (or the equivalent connection name) setting of your pipeline.
Next you must authorize the service connection. To do this, use one of the following techniques:
If you want to authorize any pipeline to use the service connection,
go to Azure Pipelines, open the Settings page, select Service
connections, and enable the setting Allow all pipelines to use this
connection option for the connection.
If you want to authorize a service connection for a specific
pipeline, open the pipeline by selecting Edit and queue a build
manually. You will see a resource authorization error and a
"Authorize resources" action on the error. Choose this action to
explicitly add the pipeline as an authorized user of the service
connection.
We had the same issue with the Service connection not showing up.
We had 2 projects configured in Azure Devops and each project had a service connection defined with the same name.
It turned out that Azure Devops couldn't handle the duplicate name. We renamed one and everything was fine again
I am currently working on a project in which I need to accomplish the following using a scheduled task in an Azure Mobile Service (if it's possible):
Update a cloud service deployment configuration to put the cloud service into maintenance mode.
Wait a predetermined length of time for any pending work in the cloud service to complete.
Perform a backup of SQL Azure database used by the cloud service.
Wait another predetermined length of time for the backup to complete.
Update the cloud service deployment configuration to bring the cloud service out of maintenance mode.
I've got step 3 figured out already and steps 2 and 4 are relatively trivial to add. My hangup is with updating the cloud service deployment configuration using the Azure Service Management REST Api.
(I've come across no other means of doing this in a Node.js script).
The calls to the endpoint using the provided Node.js module request (example: http://msdn.microsoft.com/en-us/library/windowsazure/jj631641.aspx) are easy enough but the requests must contain a management certificate as per http://msdn.microsoft.com/en-us/library/windowsazure/ee460782.aspx
So my question is: How do I attach my management certificate to the request?
Keeping in mind that this is to be done within a scheduled task (which is a Node.js script).
Management certificate is just a standard certificate file (.cer) (X.509 v3). You can put the contents in a string (Don't kill me for suggesting this) or a table which your script would read.
Once you have the certificate content in hand as a string, you can attach it to the HTTPS request you are making to the Azure service management API. Nate Good has a nice post on how to achieve this with nodejs. He is reading the certs from files, so you'll have to change that part and replace it with your cert strings.