Register your web app in the Azure AD and grant it the necessary permissions to access OneDrive for Business and SharePoint files and folders. Then, you can use the Microsoft Graph API to get a list of all students in your Azure domain and upload files to their OneDrive for Business accounts.
Here’s an example of how you can use the Microsoft Graph API to upload a file to a user’s OneDrive for Business account:
const options = {
authProvider,
};
const client = Client.init(options);
const file = {
name: "myfile.txt",
content: "This is the content of the file"
};
const response = await client.api('/users/{user-id}/drive/root/children')
.post(file);
You can find more information about using the Microsoft Graph API to interact with OneDrive for Business and SharePoint files and folders at https://docs.microsoft.com/en-us/graph/onedrive-concept-overview
Hope this helps!