web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Dynamics 365 Authentication fails from Console application

(0) ShareShare
ReportReport
Posted on by 180

Hi,

I wonder if anyone has tried Github sample for Powerapps please? I am using one of the sample therefore getting error when trying to authenticate to Dynamics 365. I have posted the error details on the link below..

https://github.com/microsoft/PowerApps-Samples/issues/179

"The remote server returned an error(401) . Unauthorised"

Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

Any idea what is wrong here?

Thanks

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    The code is valid. According to the message you posted you haven't provided the valid connection string. Can you please provide the connection string you used?

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Check if you are providing correct Username, Password & CRM URL.

    Please mark my answer verified if i were helpful

  • Umer Javed Profile Picture
    180 on at

    This is the connection string

    <add name="Connect"  connectionString="  AuthType=OAuth;   Username=umer@XXXXX;   Url=XXX.crm11.dynamics.com;   AppId=XXXX-XXXX-XXXX-bea6-XXXXXXX;

     RedirectUri=https://localhost;

     TokenCacheStorePath=c:\MyTokenCache;

     LoginPrompt=Auto"/>

    Also added below the debugging step after the prompt for password and the second factor authentication (code)

    pastedimage1616690870909v1.png

  • Umer Javed Profile Picture
    180 on at

    It is correct..

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    According to the description your configuration is wrong - docs.microsoft.com/.../mt608573(v=crm.8)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans