How to use SharePoint through WebDAV for an Office365 Education account with 2FA enabled

What is the problem you are having with rclone?

I'm trying to access SharePoint through WebDAV for an Office365 Education account. The config that used to work now gives an error

2022/06/15 11:40:06 Failed to create file system for "odrive-webdav:": wst:FailedAuthentication: Authentication Failure (AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access ''.)

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1
- os/version: Microsoft Windows 11 Pro 21H2 (64 bit)
- os/kernel: 10.0.22000.708 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.9
- go/linking: dynamic
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

WebDAV/sharepoint (acccount: Office 365 Education)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone lsd odrive-webdav:

The rclone config contents with secrets removed.

[odrive-webdav]
type = webdav
url = https://ABC.sharepoint.com/sites/XYZ/Shared Documents
vendor = sharepoint
user = USER@DEF.edu
pass = REMOVED

A log from the command with the -vv flag

2022/06/15 12:19:16 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone.exe" "-vv" "lsd" "odrive-webdav:"]
2022/06/15 12:19:16 DEBUG : Creating backend with remote "odrive-webdav:"
2022/06/15 12:19:16 DEBUG : Using config file from "C:\\Users\\USER\\.config\\rclone\\rclone.conf"
2022/06/15 12:19:16 DEBUG : found headers:
2022/06/15 12:19:16 Failed to create file system for "odrive-webdav:": wst:FailedAuthentication: Authentication Failure (AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access ''.)

Your institution turned on MFA so that's why.

If your organization supports it, you can try to setup an application password.

Using app passwords with apps that don't support two-step verification (microsoft.com)

If your organization supports it, you can try to setup an application password.

I was hoping to try an app-specific password but didn't find any way to create one. I took your statement to mean that, unlike personal account, this ability may not be available for an Education account?

It's an organization setting so doesn't matter if business or edu as it can be turned on/off.