eIDs
Learn more about Danish MitID Erhverv token contents, how to request business logins and how to create test users.
The sub
, nameidentifier
and uuid
values here will not be the same as for a corresponding citizen-MitID login, even if the user chose to use their personal MitID for login.
Business users (both employees and company signatories) may not always have CPR numbers associated with their profiles.
CPR numbers are also not required for accessing information about the business entities where the user holds a position as a signatory or an employee. Criipto relies on the user's UUID to retrieve this information from the MitID Erhverv API. Therefore, if you don't need CPR numbers in business logins, no additional configuration is required.
If you do require CPR numbers, you can collect them by enabling the two toggles in the management dashboard:
When the "CPR Optional" toggle is enabled, a user will be prompted to provide their CPR number ONLY if the CPR number is registered in their profile. This feature can be useful in a scenario where you offer both MitID citizen logins and business logins, and require CPR numbers for the citizen logins.
You can request a login in business context via the following acr_values: urn:grn:authn:dk:mitid:business
.
Alternatively, you can send a login_hint=business
or login_hint=business_optional
query parameter in the authorize request.
This will allow company signatories and employees to log in to your site or application with their personal MitID or their dedicated employee MitID (depending on how they have been setup in MitID Ervherv).
login_hint=business
will allow logging in as a business user.
login_hint=business_optional
will give an option to choose to log in as a private individual, or a business user.
You can read more about the login_hint
here.
You can determine which kind of option the user selected by inspecting the claim values in the JWT payload.
employee
claim with value true
.companySignatory
claim with value true
.If you already have an expectation of what company the user will login on behalf of, you can prefill the VAT ID (CVR number) to limit their selection choice (if multiple roles in the same company) or skip the company selector all together.
urn:grn:authn:dk:mitid:business
: login_hint=vatid:DK<CVR>
login_hint=business vatid:DK<CVR>
To test business logins with MitID Erhverv, you will start by creating a test organization and a test user, and then connect the test user to the organization as an employee.
Detailed instructions, along with a video demonstration, are provided below to guide you through the process.
Go to the test organization creation page and fill in the form: https://testportal.test-devtest4-nemlog-in.dk/
The wizard will generate an organization admin account with username/password credentials. The password is self-supplied, and the username is autogenerated.
You can then follow the Link til MitID Erhverv - IntTest to login as the organization admin:
Manually create a test user in both:
Test users CAN HAVE the same user ID. Test users MUST HAVE a CPR number, and it MUST BE the same in the 2 test-user creation tools listed above. When creating a test user with MitID Simulator, make sure to add a CPR number and check the Private MitID checkbox:
In general, and most likely for MitID Erhverv production, CPR numbers are expected to be optional.
Please note: creating test users is a required step. The auto-generated admin user you created for a test organization CANNOT be used for employee login.
When logged in as an admin user, you have the option to choose additional information to include when creating test users. For instance:
This can be done under Settings (Indstillinger => Oprettelse af brugere):
If P and SE numbers are enabled for an organization after test users have been created, each user must be manually updated to get these values.
This is done by editing the user configuration section, under "Organisation":
An activation link will be sent to the specified employee email: follow the link to log in as an employee. You can use your personal email for both the organization admin and the employee email.
If you don't receive the activation email, you can log in to EIA as an employee using the MitID tab. (You'll need to log out of your EIA admin account first, or use a different browser.)
If you followed the steps correctly, your EIA dashboard will look something like this:
If the organization admin has enabled use of personal MitID, the test employee can use their own test MitID for activation/onboarding, but a unique employee MitID username MUST BE specified during enrolment.