-
Notifications
You must be signed in to change notification settings - Fork 17
Login
In the app.config you can specify different login types, depending what you need for your project. If you specify any other login type, then no login will be done. In that case you can create your own hook to login. Not specifying the login type, will result in 'Default' login.
LoginType | Description |
---|---|
Default | Logs in to the API & UI via a username/password (OAuth) |
ClientSecret | Logs in to the API via a client secret. This will only work for API tests |
Hybrid | This will login to the API via a client secret connection, but use a username/password connection for the browser. |
You can login with other users by adding the 'Given' step. Here you specify a profile you want to login with. Based on this profile it will look into the users.json file. In this file you specify which test user is connected to each profile. The password is stored in KeyVault. For MFA support see here. You must store the MFA key next to the password in KeyVault with the postfix MFA. So if you specify 'Salesperson' in the Users.json file the password key is 'Salesperson' and its MFA is 'SalespersonMFA'. If you don't use MFA you must not put the key in.
To connect to KeyVault you need to specify some details in your app.config (or appsettings.config):
Key | Mandatory | Description |
---|---|---|
KeyVaultName | Yes | Name of your keyvault. This is this part of your keyvault url: https://.vault.azure.net/ |
TenantId | Yes | Guid of your Azure AD Tentant |
KeyVaultClientId | No | ClientId to connect to KeyVault |
KeyVaultClientSecret | No | ClientSecret to connect to KeyVault |
ClientId | No | ClientId to connect to KeyVault |
ClientSecret | No | ClientSecret to connect to KeyVault |
As you see in the table there are multiple ways to put in the clientid/clientsecret information to connect to KeyVault. If KeyVaultClientId is filled, it will use that. Seconday if ClientId is filled it will use that. If neither are filled it will fallback to a DefaultAzureCrential for local running. Then you can login with Visual Studio (code) or Azure CLI.
There are two ClientId possiblity as you may already use this for logging in into dynamics. You can then if needed specify a seperate ClientId to connect to KeyVault by putting in the KeyVaultClientId.