You can apply for a D-visa to Norway if one of the following applies to you:
You are going to apply for a residence permit through family immigration (see eligibility limitations here) or as a student in Norway, and you wish to travel to Norway to hand in the application to the police. Eligibility for this type of visa is limited.
You have already applied for a residence permit from abroad through family immigration (see eligibility limitations here) or as a student, and you want to travel to Norway before receiving a decision on your application. Eligibility for this type of visa is limited.
You have accepted a new job in Norway and your employer has received confirmation from the police that you may start working before your residence permit application is fully processed.
You are a skilled worker with a job offer in Norway and therefore wish to travel to Norway to hand in an application for a residence permit to the police.
You hold a valid residence permit in Norway, but you are abroad without your residence card (because it is lost, stolen, or damaged).
Your residence permit expired while you were abroad, but you have submitted an application for renewal or permanent residence.
You are a diplomat, a family member of a diplomat, or will be working for a UN organisation.