delegateas/XrmDefinitelyTyped

MFA support again

gashupl opened this issue · 2 comments

Hello.
I would like to know is there any way to use user with MFA-enabled to connect to Dynamics environment with XrmDefinitelyTyped.exe? By using MFA I mean using standard microsoft-login window where login, password and (for example) sms-code may be entered?

I've tried to run XrmDefinitelyTyped.exe from command line with many different arguments combinations but every time it's ending on:

Connecting to CRM...
Unable to generate TypeScript files: clientCredentials.UserName.UserName or clientCredentials.Windows.ClientCredential.UserName MUST be populated!

Is it possible at all?
In case it is - any examples of arguments for XrmDefinitelyTyped.exe?

I know that it is possible to use Application User related to AD App Registration (using AppId and Client Secret) but this is not what I'm asking of.

Microsofts guideline for all authentication from now on is to have an app registration. This is an effect of the removal of Office365 authentication type. You can be prompted by using the connectionString arg and method ConnectionString using a connection string like this

AuthType=OAuth;Username=jsmith@contoso.onmicrosoft.com;Password=passcode;Url=https://contosotest.crm.dynamics.com;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;TokenCacheStorePath=c:\MyTokenCache;LoginPrompt=Auto

I just tried to craft some connection string that could work without OAuth, but I did not succeed. In order to support this, I would create a version that works in XrmToolbox instead of adding the support directly, since the current focus for us is on running XrmDefinitelyTyped in an Azure Pipeline. I can not say when I have a version in XrmToolbox

Ok. Thank you for your answer. I suppose because the functionality I'm asking for is not planned - the case may be closed.