delegateas/Daxif

Environments with double authentication is impossible to connect

Closed this issue · 3 comments

Hi all,

I worked with Daxif before and normally everything works smooth.
But on our own development environment we use double authentication in Office 365.
Is there a way I can make this work?

The error I get is the following.


(2018-10-18 14:26:35Z) [Error]: Unable to generate TypeScript files: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

System.Exception: Delegate XrmDefinitelyTyped failed
   at DG.Daxif.Common.Utility.postProcess(Int32 code, String es, String os, ConsoleLogger log, String proc)
   at DG.Daxif.Modules.Solution.SolutionHelper.updateTypeScriptContext'[a,b](a org, String location, b ap, String usr, String pwd, String domain, String exe, ConsoleLogger log, FSharpList`1 solutions, FSharpList`1 entities, FSharpList`1 extraArgs)
   at DG.Daxif.Modules.Solution.Main.updateTypeScriptContext[a](Uri org, String outputDirectory, a ap, String usr, String pwd, String domain, String pathToExe, LogLevel log, FSharpList`1 solutions, FSharpList`1 entities, FSharpList`1 extraArgs)
   at <StartupCode$FSI_0058>.$FSI_0058.main@() in C:\Repos\Syntra\Crm.Extensions\Esc.Syntra.Crm.Extension\Scripts\Daxif\GenerateTypeScriptContext.fsx:line 10
Stopped due to error

Thanks in advance!

We have not added support for 2FA in Daxif, since we mainly run it on build servers.

It seems like a big task to implement, since you would love to have the same authentication work across different calls to the scripts. We would like to have it though, but it needs to be done right.

None the less it would make sense to throw a more beautiful error.

XrmToolbox recently implemented 2FA-support in v1.2018.7.26. I have not looked at how it is implemented, but maybe we could find inspiration there.

As Magnus mentions, this does not currently have a high priority since we are fans of automating deploys with a build-server, which necessitates having a user without 2FA (or so I thought - maybe we should look into using an application in Azure as described here: MscrmTools/MscrmTools.Xrm.Connection#46 (comment))

Seems logical to work mostly from a build server. This is only one scenario for me that I came across during testing. Most of the time we work on a build server as well.

The application in Azure could be a solution for testing in our own environment.