- 1 Minute to read
- Print
- DarkLight
- PDF
User Modification / Update User Properties
- 1 Minute to read
- Print
- DarkLight
- PDF
Administrators need the ability to manage the status and other properties of application users over time. The UpdateUserProperty call provides automatic and continuous user updates with the exception of the user’s first and last name.
Format of API String
bool UpdateUserProperty(string userLogin (userid), string userPropertyName, object value, string loginName, string password, string tenantCode)
Data that needs to be supplied to the API:
userLogin (user ID) – in string format
userPropertyName – In string format (the property that needs to be updated – Eg Status)
object value – The new updated property. The format depends upon the input required for the property type. For example, if the property being updated is First Name, then the input would be in string format. If the property being updated is Status, the input would be in Boolean format.
loginName, password and tenantcode – user credentials to authenticate the API connection
Following is sample request and response code of a successful API call.
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.HostAnalytics.com/API/SOAP/StateFree/Common/2009/03/19">
<soapenv:Header/>
<soapenv:Body>
<ns:UpdateUserInformation>
<!--Optional:-->
<ns:UserLogin>NewUser007@planful.com</ns:UserLogin>
<!--Optional:-->
<ns:UserPropertyName>DynamicPlanningRole</ns:UserPropertyName>
<!--Optional:-->
<ns:Value>Power User</ns:Value>
<!--Optional:-->
<ns:LoginName>qaautomationrun4@hostanalytics.com</ns:LoginName>
<!--Optional:-->
<ns:Password>H@20@fAut0m@te</ns:Password>
<!--Optional:-->
<ns:TenantCode>BVTFullyUnifiedAPITenant</ns:TenantCode>
</ns:UpdateUserInformation>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<UpdateUserInformationResponse xmlns="http://www.HostAnalytics.com/API/SOAP/StateFree/Common/2009/03/19">
<UpdateUserInformationResult>
<Success>true</Success>
<message>User Updated Successfully</message>
</UpdateUserInformationResult>
</UpdateUserInformationResponse>
</soap:Body>
</soap:Envelope>
Dynamic Planning Roles are supported only in those applications where the Unified User Management is enabled. You can contact Planful Support to enable this feature in your application.
Sample Calls
(”klakshmi@planful.com”,”Status”,true,”planfuluser@gmail.com”,”planfulusertest”,”QATenant”) → Makes the user ‘klakshmi@planful.com’ Active in QATenant
(”klakshmi@planful.com”,”Status”,false,”planfuluser@gmail.com”,”planfulusertest”,”QATenant”) → Makes the user ‘klakshmi@planful.com’ InActive in QATenant
(”klakshmi@planful.com”,”NavigationRole”,”BudgetAdministrator”,”planfuluser@gmail.com”,”planfulusertest”,”QATenant”)
(”klakshmi@planful.com”,”ReportingRole”,”RegularUser”,”planfuluser@gmail.com”,”planfulusertest”,”QATenant”)Invalid input – user does not exist in the tenant
<UpdateUserInformationResult>
<Code>15</Code>
<Success>false</Success>
<message>User does not exist in the tenant.</message>
</UpdateUserInformationResult>
<UpdateUserInformationResult>
<Success>true</Success>
<message>User Updated Successfully</message>
</UpdateUserInformationResult>
Invalid Cases
The user login is invalid
Invalid value for NavigationRole and/or ReportingRole
userPropertyName does not equal the status/navigationRole/reportingRole