Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

OrganizationWebProxyClient is null using CrmServiceClient with authtype as OAuth

(0) ShareShare
ReportReport
Posted on by 4

Hi all,

 

I have several custom console applications for my organization's instance of Dynamics 365. I switched over to using OAuth for authentication last April because the previous connection string stopped working due to deprecation. So I changed from 

 

-connectionString="AuthType=Office365;  Username="";  Password="";  Url="" "

to

connectionString=" AuthType=OAuth; Username=""; Url=""; Password=""; AppId=51f81489-12ee-4a9e-aaae-a2591f45987d; RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97; LoginPrompt=Never;"

 

as recommended in the Microsoft docs

 

Now a year later I cannot log in through the applications, I am receiving the error in the below

 

ERROR REQUESTING Token FROM THE Authentication context - General ADAL Error
Federated service at https://adfs.kaust.edu.sa/adfs/services/trust/2005/usernamemixed returned error: ID3242: The security token could not be authenticated or authorized. => Response status code does not indicate success: 500 (InternalServerError). => <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action><a:RelatesTo>urn:uuid:b2ec290a-c4c3-4f25-a6e6-4efd5634be21</a:RelatesTo><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2023-04-05T06:32:41.294Z</u:Created><u:Expires>2023-04-05T06:37:41.294Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:FailedAuthentication</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">ID3242: The security token could not be authenticated or authorized.</s:Text></s:Reason></s:Fault></s:Body></s:Envelope>: Unknown errorUnable to connect to CRM: Response status code does not indicate success: 500 (InternalServerError).
Federated service at https://adfs.kaust.edu.sa/adfs/services/trust/2005/usernamemixed returned error: ID3242: The security token could not be authenticated or authorized. => Response status code does not indicate success: 500 (InternalServerError). => <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action><a:RelatesTo>urn:uuid:b2ec290a-c4c3-4f25-a6e6-4efd5634be21</a:RelatesTo><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2023-04-05T06:32:41.294Z</u:Created><u:Expires>2023-04-05T06:37:41.294Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:FailedAuthentication</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">ID3242: The security token could not be authenticated or authorized.</s:Text></s:Reason></s:Fault></s:Body></s:Envelope>: Unknown errorUnable to Login to Dynamics CRM
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null
OrganizationWebProxyClient is null

 

I'd really appreciate it if anyone has any suggestions 🙂

 

Graham

 

 

  • grahamlee Profile Picture
    4 on at
    Re: OrganizationWebProxyClient is null using CrmServiceClient with authtype as OAuth

    Hi,

     

    Thanks for the replies, I actually registered the app on Azure and connected using the client secret in the end.

     

    Many thanks!

  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at
    Re: OrganizationWebProxyClient is null using CrmServiceClient with authtype as OAuth

    @Anonymous that app id works in all environments, not only on sandbox ones

  • Community Power Platform Member Profile Picture
    on at
    Re: OrganizationWebProxyClient is null using CrmServiceClient with authtype as OAuth

    Hello,

     

    The app id 51f81489-12ee-4a9e-aaae-a2591f45987d only works for sandbox environments.

    If you are not on a sandbox environment, you must register a new application. See https://learn.microsoft.com/en-us/power-apps/developer/data-platform/walkthrough-register-app-azure-active-directory

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 109 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard