ARMExplorer
This project has dependencies on OAuth authentication.
Instructions
- Clone this repository to your local drive.
- Open
ARMExplorer.slnwith VS 2012+ and compile.
Create AAD application
- Go to Azure Portal while logged in as an Org ID (i.e. not MSA) and create AAD Application. You may create an application on existing AAD directory or a new directory altogether.
- Select
Add an application my organization is developing - Enter any name for application name.
- Select
WEB APPLICATION AND/OR WEB API - Enter
https://localhost:44306/asSIGN ON URL - For
APP ID URL, enter something likehttps://davidebboslingshot.onmicrosoft.com/. - Once created, click
CONFIGUREtab - On
Permission to other applications, addWindows Azure Service Management APIand checkAccess Azure Service ManagementforDelegated Permissionsand save.
Fix AADClientId and AADClientSecret in codes
- Copy
CLIENT IDand paste it in this line, replacingEnvironment.GetEnvironmentVariable("AADClientId"). - On
Keyssection, create a client secret. Copy the key and paste it in the same file, replacingEnvironment.GetEnvironmentVariable("AADClientSecret").
Test with localhost 1. In VS, make Slingshot.Api the starter project. The RedirectionSite project can be ignored. 1. Starting running it in the debugger (F5). 1. In browser, it should redirect to login page. 1. Enter AAD account and password. Note: try account that is not in the same directly as the application. Note: currently this does not work with MSA account. 1. You should be prompt with OAuth allow/deny page, do accept it.
Test ARM apis
https://localhost:44306/api/token- show current token details.https://localhost:44306/api/tenants- show all tenants (AAD directory) user belongs to.- and so on..
Test with Azure Websites
- Create Azure Websites with local git publishing enabled
- Add the site https url as the reply URL for AAD application
- Deploy the website by pushing the repository
- Set AADClientID and AADClientSecret appSettings
- To test, simply browse to the website and append the query string "?repository="
Adding Swagger based specs
Swagger files can be found on https://github.com/Azure/azure-rest-api-specs. The raw file for Web Apps is here. Also, compute and network.
cd Tools
npm install
node ConvertSwaggerToExplorerSpecs.js [Path to swagger spec] > [SpecsName].json
cp [SpecsName].json ..\App_Data\JsonSpecs