A federal business number is assigned automatically after incorporation.
For federal Ontario, provincial Alberta, or provincial BC corporations, it is part of the documentation you receive.
For Ontario provincial corporations, it is mailed by the Canada Revenue Agency 2 weeks after incorporation. If you require it sooner, you may contact the CRA directly.
Once you receive your business number, you may enrol in the HST/GST program directly with the CRA.