Table of Contents

{$page}

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.

Concept

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.

Cautions

Steps

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

code

  1. Locate the LoginName column for your user.
  1. 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

code

  1. Locate the UserName_ID column and verify whether the ID from above is listed in the table.
  1. 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.
  1. Execute this query to insert a new record.

INSERT INTO UserNameUserSecurityRole VALUES ([UserName ID],1)

code

INSERT INTO UserNameUserSecurityRole VALUES (1001,1)

code

  1. Re-try your attempts to access the API.

Source

Contributor: Brandon R., Cyrious

Date: 8/8/2013

Version: Control 5.1

See Also