Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org roles lookup and automation changes for Schoology csv ADF solution #134

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
34 changes: 13 additions & 21 deletions CustomSolutions/SDS_ADF_ETL_Integrations/SchoologyCSV/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The Azure resources for this solution consist of the following:
| kv-schoology-sds | Key vault | Contains the ClientSecretForSdsCsvADF key which should have the client secret created via the App Registration for the ADF instance (details further down) |
| stschoologycsvsds | Storage account | V2 storage account, Read-access geo-redundant storage, Encryption type: Microsoft-managed keys |
| schoologyimportcsvs | Blob storage | The container where the Schoology import files reside.  SFTP can be enabled on the storage account if transferring source files from outside the Azure tenant. (Note: The name is a suggestion and can be any name.) |
| resources | Blob storage | The container which has files used by this ADF solution. |

The setup within the Azure
subscription consists of provisioning and configuring the above resources with
Expand All @@ -65,30 +66,24 @@ following steps:
upload.  Create a resource group where to place the resources if not
already done. (suggested name rg-SchoologyCSVtoSDS). Note: The optional parameters on the confirmation screen can be filled in later during the ADF setup.

4) Modify the storage account access to enable managed identity adf-SchoologyCSVtoSDS (ADF instance) to read and modify contents. (“Storage Blob Data Contributor” role).
4) Modify the storage account access to enable authorized users to read and modify contents. (“Storage Blob Data Contributor” role). Also, the user’s IP address should only be temporarily added in the firewall in the networking tab before updating the storage contents. This must be done even if the user has access control privileges. [Assign Azure roles using the Azure portal - Azure RBAC | Microsoft Learn](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal)

5) Do the same for authorized users who need to modify data in storage. Also, the user’s IP address should only be temporarily added in the firewall in the networking tab before updating the storage contents. This must be done even if the user has access control privileges.

6) If you want to use SFTP, modify the storage account access to enable managed
5) If you want to use SFTP, modify the storage account access to enable managed
identity adf-SchoologyCSVtoSDS (ADF instance) to toggle SFTP. (“Storage Account Contributor” role). The incoming IP address should also be added to firewall in the storage account.

7) Modify key vault access to enable managed identity adf-SchoologyCSVtoSDS (ADF
instance) to retrieve secrets from the key vault (Assign “Key Vault Secrets
User” role). [Grant
permission to applications to access an Azure key vault using Azure RBAC |
Microsoft Learn](https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide?tabs=azure-portal)
6) Upload the file in the repo named enumMap.csv in the resources container. This modify the file to include any values that are in your files that are not supported by SDS. The default SDS values are at the following link: [Default list of values - School Data Sync | Microsoft Learn](https://learn.microsoft.com/en-us/schooldatasync/default-list-of-values)

8) Modify the key vault to provide access to users who need to update the secret values. (At least “Key Vault Secrets Officer” role for creating). Also, the user’s IP address should only be temporarily added in the firewall in the networking tab before updating the key vault secrets. This must be done even if the user has access control privileges.
7) Modify key vault access to provide access to users who need to update the secret values. (At least “Key Vault Secrets Officer” role for creating). Also, the user’s IP address should only be temporarily added in the firewall in the networking tab before updating the key vault secrets. This must be done even if the user has access control privileges.

9) Create an app registration in Entra to allow the ADF resource to call the Graph API’s needed then create a secret for the app registration. [Quickstart:
8) Create an app registration in Entra to allow the ADF resource to call the Graph API’s needed then create a secret for the app registration. [Quickstart:
Register an app in the Microsoft identity platform - Microsoft identity
platform | Microsoft Learn](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app)

10) Add the key vault secret values needed from the above table (Existing values were created as dummies and can be disabled). [Azure
Quickstart - Set and retrieve a secret from Key Vault using Azure portal |
Microsoft Learn](https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-portal)
9) Add the key vault secret values needed from the above table (Existing values were created as dummies and can be disabled). [Azure
Quickstart - Set and retrieve a secret from Key Vault using Azure portal |
Microsoft Learn](https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-portal)

11) Add the Graph API application permissions from the table below to the app
10) Add the Graph API application permissions from the table below to the app
registration.  Remember to grant admin consent for the added permissions. [Quickstart:
Configure an app to access a web API - Microsoft identity platform | Microsoft
Learn](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-configure-app-access-web-apis)
Expand All @@ -104,15 +99,12 @@ following steps:

## Data Factory setup

1) If not already done, create a container where the Schoology import files for the ADF instance will reside (Suggest naming it "schoologyimportcsvs" within the same storage account in the newly created resource group).

2) Go to “Private endpoint connections” in the networking tab for both the key vault and storage account and approve each.  (Also verify that public access is disabled
and there are no exceptions in “Firewalls and virtual networks”)
1) Go to “Private endpoint connections” in the networking tab for both the key vault and storage account, and ensure that each is approved.  (Also verify that public access is disabled and there are no exceptions in “Firewalls and virtual networks”)

3) Go to the Data Factory named adf-SchoologyCSVtoSDS in Azure Portal and
2) Go to the Data Factory named adf-SchoologyCSVtoSDS in Azure Portal and
click ‘Launch studio’ to make changes. Once inside, go to the Manage tab on the left menu.

4) The final step in the ADF setup is to configure the global parameters in the Manage
3) The final step in the ADF setup is to configure the global parameters in the Manage
menu as shown below, and further described in the table following.

| **Global parameter name** | **Type** | **Description** |
Expand Down
31 changes: 31 additions & 0 deletions CustomSolutions/SDS_ADF_ETL_Integrations/SchoologyCSV/enumMap.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"customValue","sdsValue","type"
"","principal","OrganizationUserRoles"
"","chair","OrganizationUserRoles"
"","professor","OrganizationUserRoles"
"","researcher","OrganizationUserRoles"
"","adjunct","OrganizationUserRoles"
"","affiliate","OrganizationUserRoles"
"","occupationalTherapist","OrganizationUserRoles"
"","physicalTherapist","OrganizationUserRoles"
"","speechTherapist","OrganizationUserRoles"
"","visionTherapist","OrganizationUserRoles"
"","paraprofessional","OrganizationUserRoles"
"","specialServices","OrganizationUserRoles"
"","advisor","OrganizationUserRoles"
"","proctor","OrganizationUserRoles"
"","nurse","OrganizationUserRoles"
"","officeStaff","OrganizationUserRoles"
"","lecturer","OrganizationUserRoles"
"","itAdmin","OrganizationUserRoles"
"","administrator","OrganizationUserRoles"
"teacher","teacher","OrganizationUserRoles"
"","faculty","OrganizationUserRoles"
"","staff","OrganizationUserRoles"
"","teacherAssistant","OrganizationUserRoles"
"","assistant","OrganizationUserRoles"
"","instructor","OrganizationUserRoles"
"","substitute","OrganizationUserRoles"
"","coach","OrganizationUserRoles"
"","alumni","OrganizationUserRoles"
"student","student","OrganizationUserRoles"
"","other","OrganizationUserRoles"
Loading