var cc = new ClientCredential(AppClientID, AppClientSecret);
var context = new AuthenticationContext("https://login.windows.net/common");
var result = await context.AcquireTokenAsync("https://api.partner.microsoft.com/", cc).ConfigureAwait(false);
I want to call the below API https://api.partner.microsoft.com/v1.0/sales/pricesheets(Market='All',PricesheetView='legacy_perpetual_software')/$value
Permission given to Azure Active Directory App as of below image.
NOTE : The code is successfully generating the access token, but when I am using this token to call the API, I am getting 401 Unauthorized error.