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?
Asked
Active
Viewed 972 times
0
-
Hi @DCZ. Which Graph APIs are you referring to? Many of them support an app-only token when you don't have or need an end user. – Chris Padgett Jan 29 '20 at 10:59
1 Answers
0
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.

Joey Cai
- 18,968
- 1
- 20
- 30