Hello Friends! 👋 So, here we are! The revision & homework planning solution is here! This is the second solution example of using contextual data that I’m releasing for you to get hands on with, without having to do the build yourself!
In this post, we’ll take a look at where to get hold of the solution, and the configuration steps you’ll need to go through to get this working in your own environment.
Note: this solution will only work in Education tenants where the availability of Microsoft Teams assignments is present.
Create the app registration
So lets start by creating an app registration in Azure AD which has the necessary permissions we’ll need to do this.
I’m going to start by creating an app called assignments and then I’ll head to the API permissions to add the Graph permissions we need to get hold of Teams assignments.
I’m going to select Add a permission, then Microsoft Graph, then delegated permissions and add the EduAssignments.Read delegated permission to my application. I then need to grant admin consent for this API permission as required.
Next I’m going to head to Authentication and add a web platform with the following Redirect URI.
Now I’m going to head to Certificates & Secrets and create a client secret which I’ll need to note down the value of in a notepad or text edit window temporarily.
You’ll also need to copy down the client id of your app registration and tenant id which can be found on the overview page.
The solution file provided in this sample does not use Azure Key Vault for storing secrets. It is advised to use Azure Key Vault for storing the secret to reduce risk of secrets being shared or found from the client side.
Download and import the solution
You can download the solution from my GitHub below. You’ll then need to import the managed solution file into your environment. Remember this solution is only compatible with education tenants. This is due to the nature of the calls we make to Microsoft Graph where Teams assignments need to be present in the tenant for data to successfully be returned.
Download the solution below.
Populating Environment Variables
Once you’ve imported the solution, you’ll simply need to populate the environment variables with the content you captured when creating the app registration.
|Variable Name||Variable Type||Value(s)|
|Assignments Authorisation URL||Text||https://login.microsoftonline.com|
|Assignments Client ID||Text||Client ID from the app registration you created (temporarily copied to notepad 😉)|
|Assignments Resource URL||Text||https://graph.microsoft.com|
|Assignments Secret||Text / Secret||Paste in the secret created in your app registration. If you are able to use Azure Key Vault (recommended), paste in the values that reference your secret in Key Vault.|
|Tenant ID||Text||Tenant ID copied from Azure Active Directory|
Good to go!
That’s it! Once you’ve followed the steps above you should be able to use and share the My Homework & Revision app for you and your students to use!
If you enjoyed this solution build, or if you like the solution as its sample, let me know! Be sure to also subscribe down below to get my upcoming posts directly in your inbox!