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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Dynamics 365 customer engagement - Web api - url ... is not valid because it is not based on.

(0) ShareShare
ReportReport
Posted on by 180

My angular app, was suddenly giving strange errors when i used web api put to assign a lookup value on the entity using web api:

The URI 'MYTENANT.crm.dynamics.com/.../kipon_staffs(d3dd9b93-1b0b-e811-80ee-00505694498c)' is not valid because it is not based on 'https://MYTENANT.crm.dynamics.com/api/data/v8.2/'.

The reason turned out to be very simple. I was using the v9.0 endpoint in the url, but due to use of generic libraries, the odata link in the body of the request, was still pointing to the 8.2 endpoint

I know for sure this has been working without any problems, but suddenly it was an issue. The fix was simple.  Use the same version in the url as in the @odata.id  value.

I have the same question (0)
  • Pedro Cadavez de Freitas Profile Picture
    Microsoft Employee on at

    Hello Kjeld,

    Hope you are well.

    Is this something you need help with or was it to share with the community?

    Let us know.

  • Verified answer
    Kjeld Poulsen Profile Picture
    180 on at

    just to share with the community. I really like when others are posting valueable searchable findings when developing on top of dynamics 365, so i try do the same.

  • Pedro Cadavez de Freitas Profile Picture
    Microsoft Employee on at

    Thank you then for your contribution!

    Wish you all the success!

  • karenmoen Profile Picture
    5 on at

    This issue just surfaced with a Flow that I am using against Dynamics 365 CDS.  Here is the error I am getting in the Flow:

    URI 'dynamicsreadminess.crm.dynamics.com/.../ is not valid because it is not based on dynamicsreadminess.crm.dynamics.com/.../

    The Flow has been running fine, but all of of a sudden is throwing this error.  I believe that the D365 instance was updated, and that this is causing the problem.  

    The Flow is erroring out using the "Relate Records" action against CDS.  The URL entry within the Relate Records action is "body/@odata.id".

    You mention in your solution to use the same version in the URL, as in the @odata.id.  Do you know how I may be able to change the version within the Flow?  Any guidance is greatly appreciated.

  • Suggested answer
    Kjeld Poulsen Profile Picture
    180 on at

    I haven't work with flow and dynamics web api, so i am not 100% sure how to solve, but basically flow have to make an http request somehow, and in the body of the request you will have a data payload with a odata reference,  ex.

    request url: yourinstance.crm4.dynamics.com/.../v9.0/somethingdependingonwhatyouaredoing

    and in the body of the request you will  have som data in json format:

    {

     'regardingid@odata.id : 'yourinstance.crm4.dynamics.com/.../v9.1/accounts(guid-on-account)'

    }

    The above example will throw that exception, because the url fired against dynamics 365 is version 9.1, while the version used in an entity ref.

    in the payload is version 9.0.

    in this article:

    dynamicconsultantsgroup.com/.../

    I can see the the request url is being setup when creating the flow in the action. I would assume you just have to adjust the url in the action to be the same as the url in the datapayload.

    If you have url references in Uri and in Body with Web api version references, they need to be the same.

    pastedimage1587095886629v1.png

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans