-
Hi, im will try to explain what i want to do i want to download attachment from my outlook mailbox, but my organization has implementing 2FA, so im trying to get a token using the msal lib to use in the microsoft graph api. so i made this code
then i receive this message
to get a token im trying to do this
but i get this error
I don't know where I should use these parameters. if you have any suggestions it would be very helpful, thank you for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It is unfortunate that the error message was vague. You would need to toggle a setting in your app's registration (in Azure Portal) to enable Device Flow. FWIW, if your app runs on your local desktop, then a better way is to add a Desktop app redirect URI with the value |
Beta Was this translation helpful? Give feedback.
-
thanks for your answer, using an application registered in the active directory works fine, but is there any way to get a token without registering an application in the active directory? like when I authenticate through the web? |
Beta Was this translation helpful? Give feedback.
-
I hope you understand that most Q&A community (such as StackOverflow) would appreciate one question per discussion thread, so that the Q&A would be more searchable and beneficial for the future audience. Since your original question has been answered, let's close this conversation here. Please ask your other generic questions on StackOverflow and the community would help. (You may also send your question link to my email, if your question gets no response within a reasonable time.) |
Beta Was this translation helpful? Give feedback.
It is unfortunate that the error message was vague. You would need to toggle a setting in your app's registration (in Azure Portal) to enable Device Flow.
FWIW, if your app runs on your local desktop, then a better way is to add a Desktop app redirect URI with the value
http://localhost
into your app's registration, and then you can use MSAL's Desktop app sample from this "map". It works better than Device Flow.