Web Service API

The Web Service provides a direct interface to SCCM and can be used by third-party applications.

For more information on how to use the interface, see the API Reference at: https://www.smcteam.de/help/sccmmanager/3/api-reference/ .

If SOAP header security is enabled, the web service can only be called with a specific SOAP header. This is generated using the enclosed .NET class library. In addition, a suitable token must be created. This configuration is explained below using an example.

Integration with Visual Studio

This video shows the steps described here:

  1. Configuration in the configuration file "web.config" of the web service (alternatively via the application "SCCM Manager Web Config" on the server, open via the start menu):

    The "AssemblyName" is freely selectable and will be displayed later in the web service log next to the calling user.

  2. Generation of a random GUID and extension of the "Tokens.xml" file in the "Resources" directory of the web service:

  3. Include the web service reference in Visual Studio:

  4. Include the file "SCCMWebService.Token.dll" in Visual Studio:

    The SCCMWebService.Token.dll from Server installation path\Copy API to your own project directory, then reference it.

  5. Instantiation of the web service with the Soap header, the GUID passed corresponds to the one previously defined from the "Token.xml" file:
    
    			SCCMWebService.SCCMWebService sccmWebService = new SCCMWebService.SCCMWebService();
    			sccmWebService.Credentials = CredentialCache.DefaultCredentials;
    			sccmWebService.CookieContainer = new CookieContainer();
    
    			string sessionID = sccmWebService.GetSessionID();
    			string token = WebServiceToken.Create(sessionID, "7d9ac659-a113-4ad1-846f-da64ac42ca7f");
    
    			sccmWebService.SCCMSoapHeaderValue = new SCCMSoapHeader();
    			sccmWebService.SCCMSoapHeaderValue.Token = token;
    
    			//Test:
    			ServiceVersion version = sccmWebService.GetVersion();
  6. The web service can now be used.