Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

The caller was not authenticated by the GP Service

Posted on by Microsoft Employee

Dynamic GP 2013 Setup successfully done at server (Windows Server 2008 R2). Database auto created on SQL Server 2008 R2. Services are created and these are running.

Taking a console application on Visual Studio 2012 and added the Web Service of Dynamic GP. http://IP:48620/Dynamics/GPService/mex

Use a sample code to test which are given bellow:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using  WebServiceConsoleApp.DynamicGPAtTen;

using System.ServiceModel; 

namespace WebServiceConsoleApp

{

    class Program

    {

        static void Main(string[] args)

        {

            CompanyKey companyKey;

            Context context;

            Vendor vendor;

            VendorKey vendorKey;

            Policy vendorPolicy; 

            // Create an instance of the service

            DynamicsGPClient wsDynamicsGP = new DynamicsGPClient(); 

            // Create a context object with which to call the web service

            context = new Context(); 

            // Specify which company to use (sample company)

            companyKey = new CompanyKey();

            companyKey.Id = (-1); 

            // Set up the context

            context.OrganizationKey = companyKey; 

            // Create a new vendor key

            vendorKey = new VendorKey();

            vendorKey.Id = "TstVndr0001"; 

            // Populate the vendor object

            vendor = new Vendor();

            vendor.Key = vendorKey;

            vendor.Name = "TestVendor0001"; 

            // Get the create policy for the vendor

            vendorPolicy = wsDynamicsGP.GetPolicyByOperation("CreateVendor",  context); 

            // Create the vendor

            wsDynamicsGP.CreateVendor(vendor, context, vendorPolicy); 

            // Close the service

            if (wsDynamicsGP.State != CommunicationState.Faulted)

            {

                wsDynamicsGP.Close();

            }

        }

    }

}


After running application it gives following error message:

The caller was not authenticated by the service.

Any idea to solve?

Detail info on Image


 


*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The caller was not authenticated by the GP Service

    Hi,

    I was also getting the same error. Did you solve this? Please help.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans