How to get Authorization Code from Azure App using HTTP Request in C#?

这一生的挚爱 提交于 2021-02-11 15:06:45

问题


I have created a .Net Application and to access certain outlook graph API's i need to fetch the access token and to get this access token i want authorization code which need to be passed. As far as the article for Authorization Code Flow, I have seen examples where we can get the authorization code by using the browser, whereas, in my case i want to retrieve the auth code within the application. Is there any way we can achieve this?


回答1:


How to get Authorization Code from Azure App using HTTP Request in C#?

In short, it's impossible.

The part of OAuth 2.0 authorization flow is as below:

When getting authorization code, user need to enter credential and consent permission which is an Interactive request. So, it's impossible to use C# code getting the code directly.



来源:https://stackoverflow.com/questions/59858751/how-to-get-authorization-code-from-azure-app-using-http-request-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!