Roles assign/update not working from Postman

  • 1
  • Question
  • Updated 3 months ago
I'm testing Role assignment and updating from Postman and I'm not getting the expected results. I'm successfully creating users, but no matter how many roles I assign, I get back these:

...
"Roles": [
        "Client",
        "CanChangePassword",
        "CanManageMySettings"
    ],
...

It's puzzling because I copied and pasted the example JSON code for creating an Employee rather than a Client, and then added all the roles that I have as an Administrator. When I query my admin login, I get the big list of roles; when I query the user I created, I just get the three.

I also copied the JSON that came back when I queries my admin user and then turned it into a create JSON query (left out the id and other things assigned by the system; uniqueified the email and user name), but - again - I just get back this:

...
"Roles": [
        "Client",
        "CanChangePassword",
        "CanManageMySettings"
    ],
...

Same goes for trying to PATCH or POST to add/assign roles.

What am I missing? I have RTFM'd, but maybe I'm just not seeing it...?
Photo of Wing Flanagan

Wing Flanagan

  • 4 Posts
  • 0 Reply Likes

Posted 3 months ago

  • 1
Photo of Ross Bender

Ross Bender

  • 61 Posts
  • 10 Reply Likes
Mind sharing what your request looks like?
Photo of Wing Flanagan

Wing Flanagan

  • 4 Posts
  • 0 Reply Likes
Here it is.  This is just the JSON payload. The headers and such are omitted. They seem to be correct, as a user DOES get created - just not the way I'm hoping:

{
"IsEmployee": true,
    "IsAdministrator": true,
    "CanCreateFolders": true,
    "CanUseFileBox": true,
    "CanManageUsers": true,
    "IsVirtualClient": false,
    "DiskSpace": -1,
    "Bandwidth": -1,
    "Company": "HCL Technologies Ltd",
    "TotalSharedFiles": 0,
    "Contacted": 0,
    "FullName": "Gregor Samsa",
    "ReferredBy": "none",
    "FirstName": "Gregor",
    "LastName": "Samsa",
    "FullNameShort": "G. Samsa",
    "Emails": [
        "gregor.samsa1@heterodyne.com"
    ],
    "IsConfirmed": true,
    "IsDeleted": false,
    "Roles": [
        "Employee",
        "MasterAdmin",
        "SuperUser",
        "CanChangePassword",
        "CanManageMySettings",
        "CanUseFileBox",
        "CanManageUsers",
        "CanCreateFolders",
        "CanUseDropBox",
        "CanSelectFolderZone",
        "CreateNetworkShareConnectors",
        "CreateSharePointConnectors",
        "CanSendDocumentsForSignature",
        "CanViewSignatureDocuments",
        "CanManageSignatureTemplates",
        "AdminAccountPolicies",
        "AdminBilling",
        "AdminBranding",
        "AdminChangeFolderPay",
        "AdminChangePlan",
        "AdminFileBoxAccess",
        "AdminManageEmployees",
        "AdminRemoteUploadForms",
        "AdminReporting",
        "AdminSharedDistGroups",
        "AdminSharedAddressBook",
        "AdminViewVdrAnalytics",
        "AdminViewReceipts",
        "AdminDelegate",
        "AdminManageDropBox",
        "AdminManageFolderTemplates",
        "AdminEmailMessages",
        "AdminSSO",
        "AdminSuperGroup",
        "AdminZones",
        "AdminCreateSharedGroups",
        "AdminConnectors",
        "AdminCanAdministerCustomerAccount",
        "AdminCustomWorkflow"
    ],
    "AffiliatedPartnerUserId": "",
    "IsBillingContact": true,
    "Email": "gregor.samsa1@heterodyne.com",
    "Username": "gregor.samsa1@heterodyne.com",
    "Domain": "hcltechaadconnector"
}
(Edited)
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 732 Posts
  • 102 Reply Likes
Hi Wing,

I can help look into this. What is probably happening is that the user you've created is not an employee, but a client user, and client users are not eligible to have any additional roles. I can check to see if there's any information on how this happened. Could you provide me with your account subdomain, and the Id of the user you are trying to assign the roles to? Feel free to put that in a text file and upload it to this secure link: https://eliezeren.sharefile.com/r-rbc075f6a0bc4a498

Also, any chance you've tried to do this again with another user and have gotten the same result?

Thanks,
Eli