Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Error : Key not valid ...
Finance forum
Unanswered

Error : Key not valid for use in specified state. Dynamics 365 on cloud

Posted on by 10

Error : Key not valid for use in specified state. When call services in UAT and Production.

But development is fine. Please suggest.

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    So your D365FO x++ code calls service/code on your POS?

    Please share your code if you need help, it's the only way anyone could provide help.

  • Oct Profile Picture
    Oct 10 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    So your code is running on POS and it's calling your D365FO? No, Coding is running on Dynamics 365

    I would like to share but i don't know because I cannot debug problem on UAT and Production.

    Development can call service too. Please understand me.

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    So your code is running on POS and it's calling your D365FO?

    Then something is different in this service or service call compared to the others. You are the only one who knows what is different, unless you share more information with us.

    If I had such issue, I would share the code of the service itself, as well as the code that is calling it. And for comparison, I would share the same information about another service that is working. Could you do that, too?

    Which line in the code gives you this error?

  • Oct Profile Picture
    Oct 10 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    Sorry for misunderstanding, I call service from Microsoft Dynamics 365 to POS, this mean code on Dynamics 365.

    I have 7 services that call by same code, but this error occurs 1 service.

    Please suggest.

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    So you call service from POS? Does this mean that you wrote code on POS and that code calls some external service (that is not related to D365FO)?

  • Oct Profile Picture
    Oct 10 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    Sorry  I don't know what you want. It is a custom service.

    I get service JSON from another program and convert to str

    after that insert to table.

    In development and dev that deploy on cloud its OK.

    but in UAT and Production we got error. I don't know what's happened?

  • Martin Dráb Profile Picture
    Martin Dráb 228,212 Most Valuable Professional on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    Yes, but which particular service? Is it a standard service (which one) or a custom one (if so, what does it do)?

    We can't help you if you don't give almost any information. If you have a problem with something, you should tell us what it is straight away, without having to be interrogated. :)

  • Oct Profile Picture
    Oct 10 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    Sorry for inconvenience, I used REST Service.

  • Martin Dráb Profile Picture
    Martin Dráb 228,212 Most Valuable Professional on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    Don't you think it's important to mention what service it is?

  • Oct Profile Picture
    Oct 10 on at
    RE: Error : Key not valid for use in specified state. Dynamics 365 on cloud

    I call service from Point of sales (POS) programs to get data in to Dynamics 365,

    I test in development workspace, can call services from POS and got data.

    However, after deploy package to UAT and Production we cannot call service from POS.

    Please suggest

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans