If you receive a 403 Forbidden when you have specified a correct Control username and password, then it is possible the username you specified may have not have a Security Role defined for the API.

Each username for Control must be mapped to a corresponding UserNameUserSecurityRole record in order for the API to determine which security role should be utilized for the API. If your username is not mapped then the mapping will fail to lookup the security role and you will receive a HTTP 403 Forbidden error.

  • You will be directly modifying the SQL database, it is recommended that you backup the SQL database before making any changes.

Locate the ID for your Control Username

  1. Find the ID for your username by running the following SQL on the Control database.
    • SELECT ID, LoginName FROM Username
  2. Locate the LoginName column for your user.
  3. Note down the ID corresponding to your LoginName.

Verify User Security Role

  1. Find the ID for your username by running the following SQL on the Control database.
    • SELECT * FROM UserNameUserSecurityRole
  2. Locate the UserName_ID column and verify whether the ID from above is listed in the table.
  3. If the ID is present then your problem is the result of another cause, please skip the next section.

Adding UserName.ID to the UserNameUserSecurityRole Table

  1. If you can not locate your UserName.ID in the UserNameUserSecurityRole.UserName_ID column then must manually insert it into the table.
  2. Execute this query to insert a new record.
    • INSERT INTO UserNameUserSecurityRole VALUES ([UserName ID],1)
    • Example: This example assumes the ID that I found in the UserName table was 1001.
    • INSERT INTO UserNameUserSecurityRole VALUES (1001,1)
  3. Re-try your attempts to access the API.

Contributor: Brandon R., Cyrious

Date: 8/8/2013

Version: Control 5.1

You could leave a comment if you were logged in.