This project has dependencies on OAuth authentication.
- Clone this repository to your local drive.
- Open
ARMExplorer.sln
with VS 2012+ and compile.
- 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
CONFIGURE
tab - On
Permission to other applications
, addWindows Azure Service Management API
and checkAccess Azure Service Management
forDelegated Permissions
and save.
- Copy
CLIENT ID
and paste it in this line, replacingEnvironment.GetEnvironmentVariable("AADClientId")
. - On
Keys
section, create a client secret. Copy the key and paste it in the same file, replacingEnvironment.GetEnvironmentVariable("AADClientSecret")
.
Test with localhost
- In VS, make Slingshot.Api the starter project. The RedirectionSite project can be ignored.
- Starting running it in the debugger (F5).
- In browser, it should redirect to login page.
- 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.
- You should be prompt with OAuth allow/deny page, do accept it.
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..
- 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="
Swagger files can be found on https://github.com/Azure/azure-rest-api-specs. The raw file for Web Apps is here.
cd Tools
npm install
node ConvertSwaggerToExplorerSpecs.js [Path to swagger spec] > [SpecsName].json
cp [SpecsName].json ..\App_Data\JsonSpecs