We created a set of powershell cmdlets to connect to a portal, start/update/delete workflows and adding attachments.
Inspired by the -UseWebLogin parameter off the Connect-PnPOnline cmdlet i extended our powershell cmdlets with a use weblogin feature. Fiddler and a bit of research in the web provided the right approach quite fast.
Authentication works fine, but when using the rest api i receive an "invalid scope" exception.
Seems that the rest api is only working with registered apps.
Would be super cool having the possibility to grant permissions for using the rest api also for users and not only applications.
Btw:
I reused the code for the weblogin from my powershell and extendend https://github.com/WEBCON-BPS/RestApi-DataImporter, but....