I am trying to develop a web application using which I want to be able to connect to my Azure subscription, read all my resources and display those back on my app. I only need the name, IP and resource type. I know I can authenticate against Azure using PowerShell but not quite sure how I achieve this using PHP.
Most Azure service REST APIs have client libraries that provide a native interface for using Azure services.
.NET
Java
Node.js
Python
Azure CLI 2.0 SDK
We do not have a client library for PHP. I would recommend call the Azure REST API from PHP to accomplish the task you are looking at.
https://learn.microsoft.com/en-us/rest/api/azure/
Authentication is also discussed in the link above.
Related
I am creating java script website to create to the Azure iot-hub and create device on azure iot-hub. Is there any way to do this using node.js code. Like creation of azure-iot-hub and device should be hidden to the user of the website.
Azure iot-hub should be created using code rather than creating manually by signing into azure portal.
The management API for IoTHub is all RESTful, so you can use Javascript library like fetch to manage resources.
https://learn.microsoft.com/en-us/rest/api/iothub/iot-hub-resource/create-or-update
I am looking for scalable hosting for an API but I am getting a little confused with Azure. Ideally I want something that means I don't have to manage OS updates and security, just deploy my API code.
Is this possible with Azure? What do I need to sign up for?
In general, you are looking for the Platform as a service offer. Check What is PaaS?. For the API deployment you should check the Azure App Services. Azure API Management is for advanced API management or when you want to expose multiple APIs using a single gateway.
I have running the basic todoitem app service running on azure. Calling the below url will display the content in the todoitem table. How can I add basic security to prevent this data from being accessed by anyone, like a basic parameter, ToDoItem?MyToken=12345.
https://MyappService.azurewebsites.net/tables/ToDoItem
How can I add basic security to prevent this data from being accessed by anyone, like a basic parameter, ToDoItem?MyToken=12345.
I would recommend you using the build-in Authentication and authorization in Azure App Service.
App Service supports five identity providers out of the box: Azure Active Directory, Facebook, Google, Microsoft Account, and Twitter. To expand the built-in support, you can integrate another identity provider or your own custom identity solution.
Here are some great tutorials, you could refer to them:
For Node.js backend, you could follow 30 DAYS OF AZURE MOBILE APPS.
For developing azure mobile apps with C#, you could follow here.
I developed a native app which sync Active directory using Azure graph api and the AD data is consumed by web and mobile apps. It is working fine.
But now my client wants to use same app for AD syncing purpose in another server which is may be windows server 2008 or below. Which is not support Azure platform as per clients technical team.
My question is that is there any way can I use same app without using azure platform or can is there any way can I use AD graph API in windows server? In else case I will need to do development from the scratch using LDAP.
Thanks in Advance
Currently, there is no way to "deploy" neither the Azure AD Graph nor the Microsoft Graph such that you can leverage the same code for on prem and the cloud. As you've indicated, you will need to either have two apps or have a fork in your code to call the Graph when running with Azure AD and do LDAP queries when running purely on prem.
I am trying to find a sample on how to create an Azure Website (web app) deployment slot via the REST API. Any pointers would be appreciated.
Thanks!
You can use the Azure Management libraries to do this directly to the API. You can find the Libraries here and a sample of how to use them here. An extra way to do it is use the Azure Resource Manager REST API directly.