-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Ole Martin Pettersen edited this page Mar 17, 2021
·
21 revisions
Wiki for Did
📖 Table of Contents
* [➤ Creating your own app registration in the Azure Portal](#-creating-your-own-app-registration-in-the-azure-portal)
* [➤ Adding a new deployment slot](#-adding-a-new-deployment-slot)
* [➤ Roles and permissions](#-roles-and-permissions)
* [➤ Registering new subscription](#-registering-new-subscription)
* [1. Go to the main storage account](#1-go-to-the-main-storage-account)
* [2. Find table Subscriptions](#2-find-table-subscriptions)
* [3. Add new entry](#3-add-new-entry)
* [4. Add tables](#4-add-tables)
* [5. Add Roles](#5-add-roles)
* [Add User role](#add-user-role)
* [Add Admin role](#add-admin-role)
* [6. Add users](#6-add-users)
* [➤ Browsing Cosmos DB Mongo DB using Robo 3T](#-browsing-cosmos-db-mongo-db-using-robo-3t)
- Log on to portal.azure.com with your subscription
- Navigate to
Azure Active Directory -> App registrations
- Create a New registration
- With multi tenant support.
- Note down the App id - this is your
OAUTH_APP_ID
env variable
- Authentication
- Set the redirect URIs
- localhost:port/auth/callback for dev
- yourwebsite.azurewebsites.net/auth/callback if you've created an enterprise app
- Enable Implicit grant flow using both
Access tokens
andID tokens
- Ensure Supported account types are set to
Multitenant
- Set the redirect URIs
- Certificates & secrets
- Create a new Client secret and note it down - this is your
OAUTH_APP_PASSWORD
environment variables
- Create a new Client secret and note it down - this is your
- API permissions - all Delegated
- Calendars.Read
- User.Read
- offline_access
- openid
- Exposed APIs
- Add a scope for Calendar.Read
Some branches might contain breaking changes but should still be available for testing on www
.
This is a quick guide showing you how to make a new deployment slot for your app in Azure.
- Go to your app in Azure (Did 365 App)
- Under Deployment find Deployment slots
- Click Add slot
- Pick a good name, e.g. the PR number (e.g.
212
) - Under
Clone settings from:
pickdid365-dev
- When you're new slot is created go to Settings => Configuration => Application settings
- Change
OAUTH_REDIRECT_URI
to correspond with the URL of your slot. Note the value ofOAUTH_APP_ID
. - Go to
https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Overview/{OAUTH_APP_ID}/
. ReplaceOAUTH_APP_ID
with the ID from7
- Go to
Manage
=>Authentication
- Under
Redirect URIs
add the URL of your slot. Remember to append/auth/callback
. - Your new slot should be good to go!
Id | Name | Description |
---|---|---|
e18a7c45 | accessCustomers |
Access Customers page |
289a64ab | accessProjects |
Access Projects page |
2653c3aa | accessAdmin |
Access Admin page |
a031c42f | accessReports |
Access Reports page |
ef4032fb | manageProjects |
Manage projects |
c5439319 | deleteProjects |
Delete projects |
09909241 | manageCustomers |
Manage customers |
8b39db3d | deleteCustomers |
Delete customers |
did365storage
in resource group pzl-did
.
Property name | Type | Value |
---|---|---|
PartitionKey | String | Default |
RowKey | String | Tenant ID |
Name | String | Name of organisation |
ConnectionString | String | Connection string for organization storage account |
Add the following tables to the organization storage account:
- ConfirmedPeriods
- Customers
- Labels
- Projects
- Roles
- TimeEntries
- Users
- Go to table Roles
- Add new entry
Property name | Type | Value |
---|---|---|
PartitionKey | String | Default |
RowKey | String | Random GUID |
Name | String | User |
Permissions | String | See Roles and permissions |
-
Go to table Roles
-
Add new entry
Property name Type Value PartitionKey String Default RowKey String Random GUID Name String Admin Permissions String See Roles and permissions
-
Go to table Users
-
Add new entry
Property name | Type | Value |
---|---|---|
PartitionKey | String | Default |
RowKey | String | User ID in Azure AD |
FullName | String | Full name of the user |
Role | String | User or Admin |
Download Robo 3T (freeware) from robomongo
Navigate to the Cosmos DB storage account in the Azure portal.
Set up the connection in Robo 3T. You will find Username and password under 2. from the image above
After adding the details click "Test", if everything is working you should see something like this