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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

How to get Proper Response in REST API?

(0) ShareShare
ReportReport
Posted on by

From POSTMAN 

{
    "timestamp""30-04-2021 08:58:54 AM",
    "path""zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
    "status""UNAUTHORIZED",
    "kgcpErrorCode""INVALID_TOKEN",
    "msg""Token 6489ac41-6249-48d5-aec9-25ea618a2f77 is invalid. Please provide a valid Token."
}

From POSTMAN getting proper JSON as Response.

While consuming Same REST API from D365FO.

Code:

catch
{
str logFailed,logFailed1;
ex = CLRInterop::getLastException();


if (ex != null)
{
ex = ex.get_InnerException();
if (ex != null)
{
logFailed += ".Inner exception = " + ex.ToString();
}
}
info( logFailed);
//return ex.Message;

}
catch (Exception::CLRError)
{
str logFailed;
ex = CLRInterop::getLastException();
if (ex != null)
{

ex = ex.get_InnerException();
logFailed += ".Inner exception = " + ex.ToString();
}
info( logFailed);
}

Getting following exception: The remote server returned an error: (401) Unauthorized.

How I can get same response as POSTMAN.

 

I have the same question (0)

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 83

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 76 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans