KoenZomers / OneDriveAPI

API in .NET Framework 4.8.0, .NET Core 3.1 and .NET 6.0 to communicate with OneDrive Personal and OneDrive for Business
Eclipse Public License 1.0
109 stars 34 forks source link

[BUG] Brief description #30

Closed azmilassoued closed 3 years ago

azmilassoued commented 3 years ago

i'm getting token error : KoenZomers.OneDrive.Api.Exceptions.TokenRetrievalFailedException : 'Failed to retrieve OneDrive access token. Additional information: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '862d394a-115d-44f2-a578-02cc29028ec6'. Trace ID: 743a6d20-ba84-4c5b-80ee-7d480c66a400 Correlation ID: 729fbe5d-8599-4ccd-9409-e1e8781a9695 Timestamp: 2021-01-27 13:35:39Z' could you help me to find a solution, i need it so much

image

KoenZomers commented 3 years ago

Looks like you're trying to use it with your own Azure Active Directory App registration under the client id 862d394a-115d-44f2-a578-02cc29028ec6, correct? Ensure you have added the following RedirectURI to your App Registation in your Azure Active Directory:

https://login.microsoftonline.com/common/oauth2/nativeclient

image

Or alternatively ensure that on the OneDrive instance you set the AuthenticationRedirectUrl property to match with whatever Redirect URI you want to use and ensure that the same URI is in your Azure Active Directory application registration.

image

azmilassoued commented 3 years ago

Thank you for your response, it works good

KoenZomers commented 3 years ago

Thanks for confirming!