| WSUser |  | 
 Syntax
Syntaxpublic GetUserIPAccessOut GetUserIPAccess( GetUserIPAccessIn input )
 Remarks
Remarks|  Note | 
|---|
| Setup: Manager > Employees > Policies Configuration > Security > IP Access Business Rules: An IP Access Policy can be used to restrict users from accessing the system from non-approved networks. It can also be used to allow employees to access the system from home, but restrict their punching to approved networks. A user can only be assigned to IP access policy at a time. | 
|  Note | 
|---|
| If the inbound EmpIdentifier is not found then the IP Access Policy ID will be zero. | 
 Example
Example{
    "AuthToken":"...",
    "UserIPAccessList":[
    {
        "EmpIdentifier":"1234",
        "IPMatchList":["212.56.3.1", "212.56.3.2"]
    },
    {
        "EmpIdentifier":"5555",
        "IPMatchList":[]
    },
    {
        "EmpIdentifier":"19",
        "IPMatchList":[]
    }
    ]
}{
    "Report": {
        "APIVersion": "2.0",
        "ProcessTime": "0.1124317",
        "RequestTime": "/Date(1455665491372-0700)/",
        "ResponseTime": "/Date(1455665491484-0700)/",
        "Results": 1
    },
    "Results": [
        {
            "EmpIdentifier": "1234",
            "AllowPunch": false,
            "AllowSiteAccess": true,
            "ID": 1,
            "IPDetailMatch": true,
            "Name": "Main Office",
            "Details": [
                {
                    "Description": "Building 1",
                    "IPAddress": "212.56.3.*"
                },
                {
                    "Description": "Building 2",
                    "IPAddress": "212.56.4.*"
                }
            ]
        },
        {
            "EmpIdentifier": "555",
            "AllowPunch": false,
            "AllowSiteAccess": true,
            "ID": 1,
            "IPDetailMatch": false,
            "Name": "Remote Office",
            "Details": [
                {
                    "Description": "Building 1",
                    "IPAddress": "212.56.4.*"
                }
            ]
        },
        //Employee 19 not found
        {
          "EmpIdentifier": "19",
          "AllowPunch": false,
          "AllowSiteAccess": false,
          "ID": 0,
          "IPDetailMatch": false,
          "Name": "",
          "Details": [],
       }
    ]
}try { var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) => { int countTest_1 = 0; SoapServiceV2.GetUserIPAccessRequest request = new SoapServiceV2.GetUserIPAccessRequest(); List<UserIPAccessList> userIpAccessList = new List<UserIPAccessList>(); UserIPAccessList userIpAccessListItem = new UserIPAccessList(); userIpAccessListItem.EmpIdentifier = "123"; userIpAccessList.Add(userIpAccessListItem); request.input = new SoapServiceV2.GetUserIPAccessIn { AuthToken = AuthToken, UserIPAccessList=userIpAccessList }; SoapServiceV2.GetUserIPAccessResponse response = client.GetUserIPAccess(request); countTest_1 = (response.GetUserIPAccessResult.Results != null) ? response.GetUserIPAccessResult.Results.Count : 0; Assert.IsTrue(countTest_1 > 0); }); RunServiceClient(actionTestLogic); } catch (FaultException<SoapServiceV2.ServiceException> fe) { Assert.Fail(fe.Detail.Message); }
 See Also
See Also