I have a .Net application that compiles an inventory of all HTTP Transaction sensors (something like 120 sensors) with a specific tag and updates the HTML transactions with updated values, utilizing PRTG's API:

/api/setobjectproperty.htm?id=<id>&name=httpurl3&value=<urlValue>&username=<username>&password=<password>

(This query is iterated over multiple transactions, so it goes from httpurl1 to httpurl10 if applicable)

The application maintains a connection with PRTG for about 30 minutes with no issues, and then throws an error with response

<?xml version="1.0" encoding="UTF-8" ?><prtg><version>16.1.21.1924</version><error>Sorry, your user account is not allowed to access this information.</error></prtg>

So the end result is that the application is able to complete the query correctly for multiple sensors with multiple transactions and then stopping the update for the rest. The error doesn't seem to reside with a specific sensor and all sensors within the group have the same access rights/configurations as they're all derived from a single sensor.

The user used for the application has administrator access rights. Is there a different angle I should be looking at to resolve this issue?

EDIT BY MOD: Formatting!


Article Comments

Hello there,

Which username and password are you using inside the API call? Is it also a user with administrative privileges? Is it maybe an AD user? If so, try using a "locally created" PRTG user with admin privileges. The error message somehow indicates that the user configured in the call does not have sufficient rights to access the object. Furthermore you could take a look into the webserver logs located in C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Web Server) (there's one log-file for each day) to see if you find further indications about what's happening.

Kind regards,

Erhard


Sep, 2016 - Permalink

The user in the API call is both an AD user and has administrative privileges. I currently don't have access to the logs to look into them myself. I just found it odd that it wouldn't have sufficient privileges for some sensors and it would others, when all the sensors are cloned from one sensor, and all have the same access rights policies.


Sep, 2016 - Permalink

Most relevant are the access rights within PRTG. Make sure the AD group the user is a member of in PRTG does have sufficient access rights on all required objects. Or simply try one time using the prtgadmin user for the API call and see how that goes. The thing is when cloning objects and those do not have explicitly configured access rights for them, they inherit access rights of their parent devices. If the parent device then contains no sufficient permissions for the user group the "API user" is in, the call will fail on those objects.

Kind regards,

Erhard


Oct, 2016 - Permalink