Under Authentication set Allow public client flows to Yes.
Under API permissions add Tasks.Read.
Create a $XDG_CONFIG_HOME/twtodo/credentials.env file:
# Tenant ID of the application on Azure. Set the value to 'consumers' if your
# Microsoft Account is a personal account.
TENANT_ID=<tenantID>
# Client ID of the application on Azure.
CLIENT_ID=<clientID>
go install github.com/simachri/taskwarrior-ms-todo/cmd/twtodo@latest