microsoft / Partner-Center-DotNet-Samples

Contains sample code on how to use the Partner Center .NET SDK
MIT License
97 stars 118 forks source link

NOT able to get Access Token #129

Open Mani0811 opened 1 year ago

Mani0811 commented 1 year ago

Steps to reproduce

Run CSP application with valid aap id, app secret and customer Id . AuthenticationResult token = await serviceClient.RefreshAccessTokenAsync( $"{AADInstance}/{tenantId}/oauth2/token", "https://graph.microsoft.com", refreshToken, CSPApplicationId, CSPApplicationSecret).ConfigureAwait(false); .

Expected behavior

we are suppose to get valid token

Actual behavior

What is the behavior observed?

Diagnostic logs

Please share test platform diagnostics logs.
The logs may contain test assembly paths, kindly review and mask those before sharing. CSPApplication.Exceptions.AuthenticationException: 'AADSTS65001: The user or administrator has not consented to use the application with ID '-----------' named 'partner center web app - ukb and app direct shared'. Send an interactive authorization request for this user and resource. Trace ID: ba83a30b-0515-44aa-a7f2-567913475d00 Correlation ID: d0ee1c19-1545-44ba-9f4d-8d91b4af0232 Timestamp: 2023-11-05 15:28:29Z'

Environment

Please share additional details about your environment. windows 10 PC Version

Mani0811 commented 1 year ago

it is implementation with Cloud Solution Provider (CSP)