DEV Community

Discussion on: How to obtain an OAuth access token in Dynamics CRM 365 Online using C#

Collapse
 
hpandalai profile image
hpandalai

Hi,
I have tried the above approach to connect to our Dynamics 365 online. Where would I get the client_id from? I tried the value you provided thinking its a constant but I get an error back saying AADSTS50126: Invalid username or password. But I can login with the account thru the ui. What would be the problem? I tried our dev test environment and getting the same message. Many Thanks.

Regards,
Hari

Collapse
 
benjsoft profile image
Benjsoft

The client id that is generated for your app when you register it in Azure

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
benjsoft profile image
Benjsoft

Here is an alternative approach

youtube.com/watch?v=Td7Bk3IXJ9s

Collapse
 
ashv profile image
Ashish Vishwakarma • Edited

Find end to end tutorial here, clientId comes from Azure AD App, which you need to create.

ashishvishwakarma.com/Dynamics-365...