I am facing License Limit Exceeded Exception when trying to insert a new user through Apex rest api class and error is given below

Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, License Limit Exceeded: []

How can I avoid this exception?

1 Answer 1


There is no solution to this since you have consumed all the license that were allocated for your org .

Deactivate the existing users if you are testing your code .

You can also purchase additional license to avoid this .

  • Yeah......Mohith, I am thinking you are right.....
    – KS Kumaar
    Jun 24, 2016 at 11:20
  • 2
    @KSKumaar - FYI... if you create a user within a Unit Test, then license limits are not considered. If you are testing code, then try to do it within an Apex Unit Test.
    – JDB
    Jun 24, 2016 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .