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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OrganizationWebProxyCl...
Power Apps
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

 

 

I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

  • Guido Preite Profile Picture
    1,490 Super User 2024 Season 1 on at

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

  • grahamlee Profile Picture
    4 on at

    Hi,

     

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

     

    Many thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard