Here is an example of how to post an Excel file to Microsoft365 using the WriteToExcel365 component.
In order to use this component, you need to have a contract and prior setup with Microsoft365 for Business and OneDrive for Business.
Preparing Microsoft365 for Business and OneDrive for Business
Please prepare a Microsoft365 account and log in to the Azure Portal. From the contract page, select “Register App” to register your app.
After creating the app, open the details page and note down the Application ID and Directory (Tenant) ID displayed. These values, along with your Microsoft365 account’s email address and password, will be set in the properties of the WriteToExcel365 component.
Next, from the authentication menu, confirm that the type of accounts that are supported is “Accounts only included in this organization directory” and set “Allow public client flow” to “Yes” and save.
Select “Add Platform” and choose “Mobile and Desktop Applications” for the platform configuration.
Check the first item of the Redirect URI, enter “https://localhost” in the Custom Redirect URI, and press the configure button to save.
Next, from the manifest menu, set “oauth2AllowIdTokenImplicitFlow” and “oauth2AllowImplicitFlow” to “true” and save.
Next, from the API permissions menu, click “Add Permission” and select “Microsoft Graph” from the frequently used Microsoft APIs.
For API permission requests, select “Delegated Permissions” and to select permissions, enter “File” and the permissions “Files” will be displayed, so expand it and check “Files.ReadWrite” and press the configure button.
Confirm that “Files.ReadWrite” is displayed under API / Permission Name and click “Give Admin Consent”. When the confirmation dialog appears, click “Yes”.
Click “Enterprise Application” and click “Give Admin Consent” under permissions. When the “Review permissions for the organization of the required permissions” opens, click “Accept”.
With this, the preliminary preparations are complete.
Need more help with this?
Join our slack community for help