Unable to create user with OrgApplications values

I'm testing user creation in Postman and have been unable to add our OrgApplications. The technician user is created with the specified fields populated, but the only org application that gets added is what is specified in PromaryClientPortalApplicationID. What am I doing wrong?

URL: https://tulsalibrary.teamdynamix.com/SBTDWebApi/api/people

Body:

{

    "Password": "",

    "LikeDesktop": false,

    "IsActive": true,

    "IsConfidential": false,

    "AlternateEmail": "",

    "PrimaryClientPortalApplicationID": 102,

    "Company": "Tulsa City-County Library",

    "HomePhone": "",

    "PrimaryPhone": "Work",

    "Pager": "",

    "OtherPhone": "",

    "MobilePhone": "",

    "Fax": "",

    "DefaultPrimaryID": 0,

    "DefaultPriorityName": "None",

    "AboutMe": "",

    "TechnicianSignature": "",

    "ApplyTechnicianSignatureToUpdatesAndComments": false,

    "ApplyTechnicianSignatureToReplies": false,

    "HomeAddress": "",

    "HomeCity": "",

    "HomeState": "",

    "HomeZip": "",

    "HomeCountry": "",

    "DefaultRate": 0.0,

    "CostRate": 0.0,

    "IsEmployee": true,

    "IscapacityManaged": false,

    "ReportTimeAfterDate": "",

    "EndDate": "",

    "ShouldReportTime": false,

    "ResourcePoolID": "",

    "TZID": 4,

    "TypeID": 1,

    "AuthenticationProviderID": 26,

    "Attributes": "",

    "IMProvider": "",

    "IMHandle": "",

    "LocationRoomID": 0,

    "UserName": "holly.test-user@tulsalibrary.org",

    "AuthenticationUserName": "holly.test-user@tulsalibrary.org",

    "FirstName": "Holly",

    "LastName": "Test-User",

    "MiddleName": "",

    "Salutation": "",

    "Nickname": "",

    "DefaultAccountID": 3175,

    "DefaultAccountName": "Adult Services",

    "PrimaryEmail": "holly.test-user@tulsalibrary.org",

    "ExternalID": "",

    "AlternateID": "",

    "Applications": [

        "TDClient",

        "TDNews",

        "TDProjects",

        "TDWorkspaces",

        "TDNext",

        "MyWork"

    ],

    "SecurityRoleID": "8CD52654-C621-431D-9BB6-62A2054858AA",

    "ReportsToUID": "f544c51d-4e75-ef11-991b-85f92b4cb377",

    "OrgApplications": [

        {

            "ID": 102,

            "SecurityRoleId": "b73cf2d0-68b5-4947-aa49-5edf44e024ad"

        },

        {

            "ID": 103,

            "SecurityRoleId": "249f0e9e-dcbc-4856-b961-50ef0f61e693"

        },

        {

            "ID": 104,

            "SecurityRoleId": "28f192ff-d590-4e68-9e7d-44296a0e3917"

        }

    ]

}

Asked by Scott Williamson on Wed 9/18/24 12:11 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Wed 9/18/24 12:43 PM

Hi Scott, You can probably cut that body down to the following by removing the non-necessary fields that you already aren't including values for:

{
    "IsActive": "true",
    "IsConfidential": "false",
    "PrimaryClientPortalApplicationID": 102,
    "Company": "Tulsa City-County Library",
    "PrimaryPhone": "Work",
    "ApplyTechnicianSignatureToUpdatesAndComments": "false",
    "ApplyTechnicianSignatureToReplies": "false",
    "IsEmployee": "true",
    "IscapacityManaged": "false",
    "ShouldReportTime": "false",
    "TZID": 4,
    "TypeID": 1,
    "AuthenticationProviderID": 26,
    "UserName": "holly.test-user@tulsalibrary.org",
    "AuthenticationUserName": "holly.test-user@tulsalibrary.org",
    "FirstName": "Holly",
    "LastName": "Test-User",
    "DefaultAccountID": 3175,
    "PrimaryEmail": "holly.test-user@tulsalibrary.org",
    "Applications": [
        "MyWork",
        "TDAnalysis",
        "TDAssets",
        "TDClient",
        "TDCommunity",
        "TDFileCabinet",
        "TDFinance",
        "TDIPAAS",
        "TDNews",
        "TDNext",
        "TDPeople",
        "TDPortfolios",
        "TDPP",
        "TDProjects",
        "TDResourceManagement",
        "TDTemplate",
        "TDTickets",
        "TDTimeExpense",
        "TDWorkspaces"
    ],
    "SecurityRoleID": "8CD52654-C621-431D-9BB6-62A2054858AA",
    "ReportsToUID": "f544c51d-4e75-ef11-991b-85f92b4cb377",
    "OrgApplications": [
        {
            "ID": 102,
            "SecurityRoleId": "b73cf2d0-68b5-4947-aa49-5edf44e024ad"
        },
        {
            "ID": 103,
            "SecurityRoleId": "249f0e9e-dcbc-4856-b961-50ef0f61e693"
        },
        {
            "ID": 104,
            "SecurityRoleId": "28f192ff-d590-4e68-9e7d-44296a0e3917"
        }
    ]
}

Also, just note I provided all of the "Applications" (out of the box apps) there so you can know what they're called when you go to create users. I think if you ran that it should create a new user appropriately.

Sincerely,
Mark Sayers
Sr Support Consultant, CS

0 of 1 users found this helpful.
It was running okay - it created a new user and returned their UID. The issue is that it's not adding the OrgApplications - 103 and 104 don't appear as enabled on their Applications tab when you pull up their user info in the Admin UI.102 isn't set as Technician - it is added but their Security Role is "Staff". - Scott Williamson Wed 9/18/24 1:14 PM
Unfortunately, the OrgApplications property on the NewUser API object is marked as not editable. Further, it has help text stating "This only applies to *Users* after creation and will be ignored for *Customers*".

Since it is only applicable after the creation of the user, you can't set any values in that array when creating a new user. You have to edit the user account in a second API call to set OrgApplications updates.
- Mark Sayers Wed 9/18/24 1:52 PM
I completely missed that in the api doc. I did try patching one of the test accounts that I created but didn't have any luck with that either. That's when I went back to the Create User endpoint. Will ask about the patch in another question.

Thanks
- Scott Williamson Wed 9/18/24 2:53 PM