Getting web service access key using CAL code

LoufusLoufus {member_location}Member Posts: 5
Hello everyone
I am creating a .net web app that consumes NAV web service (a published codeunit)
this app will be used by multiple NAV user, where each one of them is going to publish the same codeunit as a web service.
I need to pass the userID and the web service acces key to a .NET function's parameters that will be used for the authentification
So I will be doing something like this:
public void MyFunction(string User, string password )
MyWebService WebService = New MyWebService();
System.Net.NetworkCredential networkCredentialWS = new System.Net.NetworkCredential(User, password)
WebService .Credentials = networkCredentialWS;
I will be calling this function in NAV, so I need to get the web service access key using CAL code
any idea how can I do that
PS:I am using NAVUserPassword authentication
thanks in advance

Best Answer


  • LoufusLoufus {member_location}Member Posts: 5
    thanks @Sachin_
    I can actualy get the web service acces key using GetWebServicesKey function in Codeunit 9801 identity management
  • Sachin_Sachin_ Member Posts: 67
    Cheers Mate Glad it helped!
Sign In or Register to comment.