Im trying to connect to dynamics 365 via console application, using CrmServiceClient, need to input a connection string;
one of the stuff there is "RedirectUri". where do i get that from ?
Here's my Code:
static void ConnectToCrm() { string connectionString = @"Authtype-OAuth; Username=username; Password=password; Url=https://crmurl.crm4.dynamics.com/; AppId= ; RedirectUri= ; LoginPrompt=never"; crmService = new CrmServiceClient(connectionString); Console.WriteLine($"is ready: {crmService?.IsReady}"); Console.Read(); }
ok after a few minutes of looking around i found out that the Redirect Uri is actually a connection path opening given for impersonating another admin user which i assume its the SYSTEM user that's built in... took me some time to figure that out - correct me kindly if i missed something here
at azure app overview i see
Aplication (client) ID, Object ID, Directory (tenant) ID
at Redirect URIS field there is no uri id...
i didnt understand from where do i get this RedirectUri
could you try to give a little more detailed direction where to look ?
Hi,
You can refer to my sample code, You will need to change the username, password and organization:
gist.github.com/.../77f718d9a5802d4d087722d9e6a61d0a
Docs:
The AppId and RedirectUri provided above are examples of working application registration values. These values work everywhere our online services are deployed. However, they are provided here as examples and you are encouraged to create your own application registration in Azure Active Directory (Azure AD) for applications running in your tenant. Use your Username, Password, and Dataverse environment URL values in the connection string along with the RedirectUri and AppId you obtain from your Azure app registration.
Hi,
Here you can find how to use the RedirectUri:
Redirect URI (reply URL) restrictions - Microsoft identity platform | Microsoft Docs
If this was helpful, please check it as verified to help others finding useful information.
Welcome to this amazing community.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156