Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cammurray authored May 30, 2024
1 parent 926a8d6 commit f1504b5
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,47 @@ The following API methods are pulled, flattened, and stored in to Azure Table St

Whilst the code here could be adjusted to suit any means, it is intended to run in an Azure Function App.

1. Create a new Azure Function App. Use the default options, and do not set up deployment at this stage unless you want to fork this repository.
2.
### Create the function app

When creating the Azure Function App in Azure, use the following options
* **Function App Name**: a descriptive name for your function app, and it must be unique across the azure service. As this is not HTTP triggered, the name shouldn't matter.
* **Runtime stack**: .NET
* **Version**: 8 (LTS), isolated worker model
* **Region**: Any region of your choice

![image](https://github.com/cammurray/ASTSync/assets/26195772/cec9948f-b56b-49ca-aaa4-bbddebd9ccaa)

Do not specify any other options at this stage, and press Review + Create, followed by create.

Wait for deployment to complete, and then proceed to setting the deployment method below.

#### Set the deployment method

In the "Deployment Center" for the Azure Function App (Accessible under the Deployment Menu), populate the deployment options:
* **Source** Manual Deployment - External Git
* **Repository** Is this one here: https://github.com/cammurray/ASTSync
* **Branch** main
* **Repository Type** Public

Click Save when populated

<img width="1083" alt="image" src="https://github.com/cammurray/ASTSync/assets/26195772/33958734-489d-4f53-a20e-7f76f97adf05">

#### Set up the Authentication to Graph API

There are two ways to perform authentication:
* a secure method which uses a managed identity provisioned by the Function App, however requires some PowerShell
* or by using an Azure AD Application where you manage the Client ID & Secret yourself. This is needed if the Function App is in an Azure Subscription that is not associated to the same Entra directory as M365.

##### (Option 1) Recommended - Managed Identity

First, turn on the managed identity in your azure function app by going to Settings -> Identity and turning on the system assigned managed identity for this function app

<img width="1151" alt="image" src="https://github.com/cammurray/ASTSync/assets/26195772/a1a1ae0a-6721-4244-a6b4-53d7910d4397">


#### Deploy the code

Once the deployment method has been set, you should be able to click the "Sync" button. This downloads the latest version and compiles it. Confirm the redeployment.

![image](https://github.com/cammurray/ASTSync/assets/26195772/70516189-0e0c-4b5c-88a1-97ce1665f72f)

0 comments on commit f1504b5

Please sign in to comment.