Hello All of You,
My Name is Vijay Dantani.
I am using "AuthType = OAuth " authentication to connect dynamics CRM online in .net application and I have hosed webform application in azure API App. But after deploying the app it is not connecting to the CRM.
Authentication Code :
public string GetCRMService()
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
string url = "https://test_abcd123.api.crm8.dynamics.com/XRMServices/2011/Organization.svc";
string userName = "test@test_abcd.onmicrosoft.com";
string password = "Test@12345;
string conn = $@"
Url = {url};
AuthType = OAuth;
UserName = {userName};
Password = {password};
AppId = 51f81489-12ee-4a9e-aaae-a2591f45987d;
RedirectUri = app://58145B91-0C36-4500-8554-080854F2AC97;
LoginPrompt=Auto;
RequireNewInstance = True";
return conn;
}
Please give me a solution.