Sample AppId / ClientId and RedirectUri for quick prototyping (Dataverse / Dynamics 365)


At times we want to quickly try out few things (PoC) by writing a console application or running an SSIS package etc., there we can use the sample ClientId and RedirectUri provided by Microsoft, instead of registering the application in Azure AD / creating Application User 

  • Sample AppId or ClientId = 51f81489-12ee-4a9e-aaae-a2591f45987d
  • Sample RedirectUri = app://58145B91-0C36-4500-8554-080854F2AC97

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/xrm-tooling/use-connection-strings-xrm-tooling-connect

Connection String within a console app à

CDS /CRM Connection Manager of KingswaySoft ->

or use Interactive Login –  https://nishantrana.me/2021/07/01/interactive-login-option-in-cds-crm-connection-manager-in-kingswaysoft-dynamics-365-integration-toolkit/

Also check out -Sample Code (Dynamics 365 Web API) https://nishantrana.me/2021/01/06/sample-code-dynamics-365-web-api-organization-service/

Hope it helps..

 private void Form1_Load(object sender, EventArgs e)
        {

           string ConnectionString = "AuthType = OAuth; " +
           "Username =  [username].onmicrosoft.com; " +
           "Password = [password]; " +
           "Url = https://[org].crm.dynamics.com/;" +
           "AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;" +
           "RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;" +
           "LoginPrompt=Auto";

            CrmServiceClient svc = new CrmServiceClient(ConnectionString);

            if (svc.IsReady)
            {
              
                 // do the needful

            }
        }
Advertisements

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

6 thoughts on “Sample AppId / ClientId and RedirectUri for quick prototyping (Dataverse / Dynamics 365)”

  1. Hi Nishant

    Is there a way for the redirect URI to be configured in Dynamics for other Identity providers like Okta.

    So the MSAL with Azure AD works fine for an API which needs to be consumed in PCF.

    But we want the API to be protected using say OKTA IDP and redirect back to Dynamics – can the redirect uri be configured to validate other IDP tokens in such case

    https://github.com/okta/samples-js-react/issues/214
    https://pcf.gallery/react-aad-msal-pcf/
    https://taerimhan.com/using-react-aad-msal-to-call-a-secure-api-from-a-pcf-control/

    regards

    Liked by 1 person

Leave a Reply to Nishant Rana Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.