Normally it will be assigned to you temporarily when you file I-485 (in your I-485 receipt) and then, become permanent when your I-485 is approved (get the green card).