When Identity Scopes are used in the authentication request, your application can retrieve additional information about the authenticated user from the userinfo endpoint.
Your application needs to use your obtained Access Token when calling this endpoint.
The claims returned by userinfo endpoint depend on the Identity Scopes used on your authentication request.
Example:
curl --request GET --url https://connect.visma.com/connect/userinfo --header 'authorization: Bearer [YOUR_ACCESS_TOKEN]'{
"sub": "1072cd43-d99a-4d44-84a2-5f80720c1a19",
"name": "John Doe",
"given_name": "John",
"family_name": "Doe",
"email": "john.doe@visma.com",
"email_verified": true,
"idp": "Visma Connect",
"auth_time": "1472622102",
"sid": "11474d36-22a3-40d8-925d-21af17826e38",
"roles": ["admin", "employee"],
"preferred_theme": "dark" // "light" | "dark" | "system"
}A list of claims that can be retrieved from userinfo endpoint. The claims returned is based on scopes sent in to authentication request.
Userinfo is returned in a JSON format. Note that all values are returned as JSON strings.
If the application has the flag set to true to "Include UserClaims in id_token", then we expose them in id-token as well. The UserClaims list exposable in id_token is limited to :
openid
email
profile
address
phone
sub_external_id (if you request the scope sub_external_id and enable it as Identity claim you will receive your external user id set by Connect Public API method “Add ExternalID for an Application linked to User”). Note: The external user id is prepended with your specific "clientid:", resulting in the formatted string "clientid:123456".
Scopes/Claims returned by userinfo
Scope | Claim | Description |
openid | sub | Subject, contains unique userID in Visma Connect user directory. |
E-mail address of user. | ||
email_verified | True/False. User has verified access to e-mail address. | |
profile | name | Full name of user. |
profile | given_name | First name of user. |
profile | family_name | Surname of user. |
profile | locale | Users preferred language, in format en-US. |
profile | picture | URI to profile picture of user. |
address | address | Returns attribute "country" (ISO2 code) in JSON format. JSON Format Expand source { "country":"DK" } |
phone | phone_number | Users mobile phone number. |
phone | phone_number_verified | True/False. User has verified access to phone number. |
nnin | nnin | Norwegian National Identity Number. Verified with ID-porten or BankID Norway. |
snin | snin | Swedish National Identity Number. Verified with BankID Sweden. |
dk_ssn | dk_ssn | Danish National Identity Number (CPR). Verified with MitID or MitID Erhverv. |
fi_ssn | fi_ssn | Finnish National Identity Number. Verified with Finnish electronic ID provider. |
custom | custom | Custom Claims: JSON Format Expand source { "custom": { "testApp:context":"Customer991", "myCoolApp:id":"448732", "myapp:company_orgno":"NO980858073" } } |
groups | groups | Groups the signed-in user is member of. JSON Format Expand source [ { "id":"40e5fb8d-b7c8-451a-89ba-346ae278a66a", "external_id":"babf3A76900159", "name":"Administrators", "member_since_date":"2021-12-12T15:14:40Z", "tenant_id":"8eae0115-9659-4562-a46a-9f55905fa106" }, { "id":"50e5fb8d-b7c8-451a-89ba-346ae278a66f", "external_id":"cbce3D74500243", "name":"HR", "member_since_date":"2021-11-12T19:12:30Z", "tenant_id":"8eae0115-9659-4562-a46a-9f55905fa106" } ] |
idp_claims | idp_claims | Return a JSON object of predefined claims from third party identity providers (data differs per IdP). NOTE: Will only be returned based on the IdP user has currently signed in with. Azure AD (SAML "groups" claim put into "custom"): JSON Format Expand source { "custom":[ "a92340f8-c1df-4ec3-a4d4-4831b6a12bee", "64c39883-fc2d-48ea-bef9-4c848ac7ab04", "b650505b-ad88-4992-afba-05959ef76280" ] } Feide: JSON Format Expand source { "idp_claims": { "email": "bjorg_laererg@test.feide.no", "eduPersonPrincipalName": "bjorg_laererg@spusers.feide.no", "norEduPersonNIN": "18048413567" } } MitID-Erhverv: JSON Format Expand source { "idp_claims": { "organisation_number": "1122334455", "organisation_name": "Demo Company", "authorized_to_represent": "1122334455" // only included for "Login as management of organisation" } } BankID Norway: JSON Format Expand source { "idp_claims": { "bankid_altsub": "9578-5999-4-1765512" } } |
identity_providers | identity_providers | CONNECT-5314 - Getting issue details... STATUS List of all IdentityProviders used by the User JSON Format Expand source { "identity_providers":[ { "identity_provider":"Visma Connect", "identity_provider_urn":"urn:idp:vismaconnect", "login_count":"109", "login_date":"2020-12-20T13:15:30Z", "last_login_date":"2020-12-05T11:10:30Z" }, { "identity_provider":"Google", "identity_provider_urn":"urn:idp:google", "login_count":"2", "login_date":"2020-11-05T23:15:30Z", "last_login_date":"2020-10-04T12:10:30Z" }, { "identity_provider":"ID-porten", "identity_provider_urn":"urn:idp:id-porten", "login_count":"5", "login_date":"2019-11-12T19:12:30Z", "last_login_date":"2019-11-12T10:05:30Z" } ] } |
tenants | applications | List all Applications and Tenants linked to User. CONNECT-10325 - Getting issue details... STATUS JSON Format Expand source { "applications":[ { "application_id":"financialoverview", "application_name":"Financial Overview", "sign_in_uri":"https://eco.internaltest.vismaonline.com/connect", "tenants":[ { "tenant_id":"8eae0115-9659-4562-a46a-9f55905fa106", "organization_name":"Acme Corporation Norway", "organization_number":"NO12346767", "roles":[ "Full" ] }, { "tenant_id":"95366088-6032-43b5-b0ff-9faea04aa230", "organization_name":"Swedish Company AB", "organization_number":"SE3254325325", "roles":[ "Limited" ] } ] }, { "application_id":"financialserp", "application_name":"Financials ERP", "sign_in_uri":"https://financials.acc.test.visma.net", "tenants":[ { "tenant_id":"8eae0115-9659-4562-a46a-9f55905fa106", "organization_name":"Acme Corporation Norway", "organization_number":"NO12346767", "roles":[ "Financials Administrator", "Financials Invoice Approver" ] } ] } ] } |
tenants | tenants | List all Tenants linked to current Application and User. JSON Format Expand source { "tenants":[ { "tenant_id":"8eae0115-9659-4562-a46a-9f55905fa106", "external_id":"2023434343", "application_id":"odp", "application_name":"Visma.net", "organization_name":"Acme Corporation Norway", "organization_number":"NO12346767", "roles":[ "Full" ], "built_in_roles": [ "Global administrator" ], "business_unit_name":Visma Software }, { "tenant_id":"95366088-6032-43b5-b0ff-9faea04aa230", "external_id":"2023434343", "application_id":"odp", "application_name":"Visma.net", "organization_name":"Swedish Company AB", "organization_number":"SE3254325325", "roles":[ "Limited" ], "built_in_roles": [ "User administrator" ], "business_unit_name":null } ] } // if no tenants, it will return an empty array "tenants": [] The claim will return the list of tenants for the authorize application only if that application is tenant-enabled. In all other cases the list will be empty. |
tenants | tenant_id | The tenant ID of the tenant user selected during sign-in |
tenants | tenant_external_id | The external ID of the tenant user selected during sign-in |
tenants | tenant_owner_client_id | The tenant owner client ID of the tenant user selected during sign-in |
tenant_hierarchy | tenant_hierarchy | JSON Format Expand source [ { "id":"4c9a361f-0e0d-41ac-8130-090c752954b3", "organization_name":"Visma Corporate", "organization_number":"1234567890", "country_code":"UK", "external_id":"99", "parent_id":null, "children":[ { "id":"889a361f-0e0d-41ac-8130-090c752954c2", "organization_name":"Visma Norway AS", "organization_number":"98765432", "country_code":"NO", "external_id":"88", "parent_id":"4c9a361f-0e0d-41ac-8130-090c752954b3", "children":[ { "id":"449a361f-0e0d-41ac-8130-090c752954d9", "organization_name":"Visma Software AS", "organization_number":"1234567890", "country_code":"NO", "external_id":"77", "parent_id":"889a361f-0e0d-41ac-8130-090c752954c2", "children":[
] }, { "id":"559a361f-0e0d-41ac-8130-090c752954c2", "organization_name":"Visma Software International AS", "organization_number":"1234567890", "country_code":"NO", "external_id":"66", "parent_id":"889a361f-0e0d-41ac-8130-090c752954c2", "children":[
] } ] } ] } ] |
tenants | features | JSON Format Expand source [ { "feature_code":"GOLD", "description": "Gold access to the application" }, { "feature_code":"ADMIN_UI", "description": "Access to the Admin UI" } ] |
roles | built_in_roles | Claim will only be returned when Visma Connect - Built-in Tenant Roles applicable scopes are requested. |
roles | roles | User roles from Visma Connect for the current Application. The claim applies to both non-tenant and tenant aware applications. For applications that are Tenant aware the roles are those of the "tenant_id" context set in the Access Token. JSON Format Expand source { "roles":[ "admin", "employee" ] } |
roles.vismanet | roles.vismanet | User roles from Visma.net system (ODP) in JSON format. JSON Format Expand source { "applicationTypes": [ { "applicationTypeName": "Visma.net AutoPay", "contextRoles": [ { "idCompany": 1234, "companyName": "MyCompany", "roles": ["Admin", "Reader"] }, { "idCompany": 321, "companyName": "MyComp2", "roles": ["Writer"] }] }, { "applicationTypeName": "Visma.net Financials", "contextRoles": [ { "idCompany": 1234, "companyName": "MyCompany", "roles": ["Administrator"] }] }] } |
roles.vismaonline | roles.vismaonline | User roles from Visma Online system in JSON format. JSON Format Expand source { "UserId":"38676629-66cf-43d9-87fc-6cbba2e34470", "Applications":[ { "ApplicationName":"avocado", "ApplicationId":"a7c7ed00-2455-4a54-9cb4-cbb00777f256", "Customers":[ { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"user", "RoleId":"9cc3dc38-19e9-4b44-8125-59afdfa7ded6" } ] }, { "ApplicationName":"Backup", "ApplicationId":"f60757a9-29d9-4503-bde5-ebb722359294", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"backup", "RoleId":"13da79fa-6c56-49c2-bce1-35281813e41b" } ] }, { "ApplicationName":"bureauportal", "ApplicationId":"a9b2c747-ebf3-4e4c-850b-bb41fe2c9a84", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"webadmin", "RoleId":"41785719-3e57-43b1-9cc5-0dc9444c6d52" } ] }, { "ApplicationName":"creditcheck", "ApplicationId":"e4ba7868-9b52-4531-b79a-952e7429c557", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"administrator", "RoleId":"7a97d031-d81c-4d12-870c-02e892e44fa0" } ] }, { "ApplicationName":"edi", "ApplicationId":"2a4b6d06-35a6-471e-a331-08bf99a1f7ec", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"user", "RoleId":"3f1ddae4-a696-4bf3-9caa-2b8c0f27348b" } ] }, { "ApplicationName":"Fotoapp", "ApplicationId":"0a5b08c7-0344-4a44-9ec5-3b6e2f7e0d45", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"administrator", "RoleId":"02404f1e-8bd0-4516-b617-23010bf5ea17" }, { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"administrator", "RoleId":"02404f1e-8bd0-4516-b617-23010bf5ea17" } ] }, { "ApplicationName":"Orange", "ApplicationId":"f993afab-f836-46e7-9b6e-1dc79589c9f2", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"user", "RoleId":"af86bc78-ed17-425e-9ca3-ba2ab31a2c81" }, { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"user", "RoleId":"af86bc78-ed17-425e-9ca3-ba2ab31a2c81" } ] }, { "ApplicationName":"sms", "ApplicationId":"c84ae939-adf8-4cce-a468-13c3014c73ca", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"administrator", "RoleId":"e5edf004-5c38-49f9-be05-ad7adec635bc" } ] }, { "ApplicationName":"timeclock", "ApplicationId":"3e82ebc0-1782-40d2-b674-6b0111ec6e85", "Customers":[ { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"administrator", "RoleId":"724a33c5-e510-4c7d-9e79-e2d878f3b0ed" } ] }, { "ApplicationName":"today", "ApplicationId":"70da47ab-aee3-4bee-9364-e997acfa38d7", "Customers":[ { "CustomerName":"F5 AdministrationBolaget", "CustomerId":"6766ec29-ae3f-47e2-a017-4934bcbfa957", "RoleName":"user", "RoleId":"3afd0c8f-b7d9-441d-90ee-bbd684e36333" }, { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"user", "RoleId":"3afd0c8f-b7d9-441d-90ee-bbd684e36333" }, { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"user", "RoleId":"3afd0c8f-b7d9-441d-90ee-bbd684e36333" } ] }, { "ApplicationName":"travel", "ApplicationId":"81f237d1-d77f-4788-b66e-36811981cb0f", "Customers":[ { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"administrator", "RoleId":"cde353ba-8cf9-43a0-888d-b12e059d641a" } ] }, { "ApplicationName":"webtime", "ApplicationId":"6f07ec05-3f30-4a85-827e-6321c10bc519", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"user", "RoleId":"c4814b6b-4849-4603-b393-d69b152097fe" } ] }, { "ApplicationName":"VismaMessageStore", "ApplicationId":"3160af2e-6791-4ede-a3db-a255f5696a77", "Customers":[ { "CustomerName":"F5 AdministrationBolaget", "CustomerId":"6766ec29-ae3f-47e2-a017-4934bcbfa957", "RoleName":"user", "RoleId":"555f0595-30f6-4297-8156-ea33904eea1f" } ] }, { "ApplicationName":"vismaonline", "ApplicationId":"cdc217fd-8fc6-4abe-8e30-c63833e3a81f", "Customers":[ { "CustomerName":"Byråbolaget AB", "CustomerId":"56c20cf2-98e6-4fc4-b1af-9aa5d07663c4", "RoleName":"customeradmin", "RoleId":"ddb8d5cc-0e91-400c-bcb9-aedc5b850d11" }, { "CustomerName":"Bondebolaget AB", "CustomerId":"cbcf0aa0-bdc5-4d1b-9353-cf8c5dc4ff9a", "RoleName":"user", "RoleId":"0600429b-02de-464f-9845-49b60b6d10cb" } ] } ] } To-do: CONNECT-3409 - Getting issue details... STATUS |
employee.vismaorganisationmaster | employee.vismaorganisationmaster | A JSON document containing employee information from VOM See VOM API Documentation for more details JSON Format Expand source { "Id": 101, "Name": "Vom Test", "FirstName": "Vom", "LastName": "Test",
...
"OrganisationNpsCode": "NPS1025_2", "RespOrganisationNpsCode": "NPS1025" } |
sub_external_id | sub_external_id | The external ID of user set by application |