PowerShell delegated auth

%3CLINGO-SUB%20id%3D%22lingo-sub-2170536%22%20slang%3D%22en-US%22%3EPowerShell%20delegated%20auth%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170536%22%20slang%3D%22en-US%22%3EHey%20question%2C%20I%20want%20to%20develop%20some%20interactive%20console%20PowerShell%2C%20using%20delegated%20ms%20graph%20auth.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20want%20the%20user%20to%20authenticate%20or%20be%20authenticated%20and%20have%20permissions%20to%20only%20their%20own%20Office365%20things%2C%20ie.%20email%20messages.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20is%20best%20authentication%20flow%20to%20use%3F%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2170536%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent Contributor
Hey question, I want to develop some interactive console PowerShell, using delegated ms graph auth.

I want the user to authenticate or be authenticated and have permissions to only their own Office365 things, ie. email messages.

What is best authentication flow to use?
1 Reply
Update: I have started hacking and gone with device code. It pops up a browser, stick in a code and boom, rip out the oauth token.

Seems good so far.

Please let me know if I’m making a mistake.