function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NLTNLT 

Receiving the 'Bad Message 414' error message when trying to create the users using apex code.

Hi All, Receiving the below error message when trying to create the bulk of users using apex code, Please help to resolve it.

Line: undefined, Column: undefined
Response to EXEC was : Bad Message 414

reason: URI Too Long
. HTTP CODE[414]

Thanks in advance.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Lakshman,

The reason you are getting the above error is: The receiving server is rejecting your URL saying it is too long. When you need to send large amounts of data, you have to use an HTTP POST request and not an HTTP GET which is subject to length restrictions (of no more than a few thousand characters).

Link: https://salesforce.stackexchange.com/questions/224420/bad-message-414-reason-uri-too-long

I hope this helps and in case if this comes in handy can you please choose this as the best answer so that it can be used by others in the future.

Regards,
Anutej