If you need a D number and, for example, have applied for family immigration and you are waiting for a response to your application, you must contact someone other than UDI.
UDI is only allowed to request a D number for
On the Norwegian Tax Administration's website, you can See an overview of which authorities or businesses can request D numbers (external website).