microsoft / Dynamics-AX-Integration

Dynamics AX Integration samples and demos.
285 stars 356 forks source link

On-Premise D365 OData Test #101

Open sdwibashyam2808 opened 4 years ago

sdwibashyam2808 commented 4 years ago

I am trying to use OData for an On-Premise client but it keeps giving me the error "InvalidOperationException: The response payload is a not a valid response payload. Please make sure that the top level element is a valid Atom or JSON element or belongs to 'docs.oasis-open.org/.../data' namespace."

I have seen the behavior on other platforms like Postman, where I can clearly see it is redirecting me to a login page (Status 302) even though I have given the right clientid and clientsecret.

Have you ever faced this issue with On-Prem?

Note: It is Authenticating fine and gives me the Token as well. But when it tries to query the entity, it fails with the above error.

OData error On-Premise
athakkar74 commented 4 years ago

Hi Shyam, I don't have solution for you issue but I have a need of an interface application to our On Prem AX 365 environment. I downloaded this sample app and I had that working for our sandbox on cloud but I don't find much details online on how to get it authenticated with on prem environment. is there anything you can share that helped you doing that. Any links or documents that can get me to that stage? I'll appreciate it.

srikanth-ia commented 3 years ago

Hi Shyam,

I am facing the same issue as you stated, did you get any solution for this?

Thank you!

sdwibashyam2808 commented 3 years ago

Hi Srikanth

My issue was my URL that I was passing. Make sure you pass in the right URL for the request for the token (do not use “/namespace/AXSF” in the URL in the request).i.e. Just use the https://.comhttps://%3cyourclientnamespace%3e.com as the Resource.

Also, please refer to the following link and make sure you are following all the steps accurately. https://blogs.msdn.microsoft.com/axsa/2018/04/17/authenticate-with-dynamics-365-for-finance-and-operations-web-services-in-on-premise/ .

Hope this helps.

Thanks much,

Shyamala Dwibashyam Technical Architect, D365 F&O, Retail

M +1.647.978.3354 sdwibashyam@dxc.commailto:sdwibashyam@dxc.com

DXC Technology Toronto, Canada

dxc.technologyhttp://www.dxc.technology / Twitterhttps://twitter.com/dxctechnology / Facebookhttps://www.facebook.com/DXCTechnology / LinkedInhttps://www.linkedin.com/company/dxctechnology From: srikanth-ia notifications@github.com Sent: July 28, 2020 2:13 AM To: microsoft/Dynamics-AX-Integration Dynamics-AX-Integration@noreply.github.com Cc: Dwibashyam, Shyamala sdwibashyam@dxc.com; Author author@noreply.github.com Subject: Re: [microsoft/Dynamics-AX-Integration] On-Premise D365 OData Test (#101)

Hi Shyam,

I am facing the same issue as you stated, did you get any solution for this?

Thank you!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://clicktime.symantec.com/3QWWAc9TFjNnjV2gGtZMyoK7Vc?u=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FDynamics-AX-Integration%2Fissues%2F101%23issuecomment-664799137, or unsubscribehttps://clicktime.symantec.com/3NL4WRASfb9Cg7DkGGtZFFs7Vc?u=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANU3FYURQNHSEB2WLTKVPNDR5ZT6JANCNFSM4JH2KBQQ.

DXC Technology Company -- This message is transmitted to you by or on behalf of DXC Technology Company or one of its affiliates. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind DXC Technology Company or any of its affiliates to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.