Anaplan Connect Authentication Error

Hello, 

 

I'm trying to run a batch file for Export, but I am getting an authentication error. Please let me know how to fix this. 

 

Thank you,

Veena 

 

My code:

@echo off
rem This example runs a Process that contains an Export actions
set AnaplanUser=xx:password
set WorkspaceId="xx"
set ModelId="xx"
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set Operation= -file "Download Template.csv" -put "C:\Users\xx\Desktop\Anaplan training\anaplan-connect\Download Template.csv" -process "Export" -execute
rem *** End of settings -Do not edit below this line ***
setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
@echo %Command%
cmd /c %Command%
pause

 

Answers

  • Hi Veena,

    I hope your code is an example? In the real version you did change the WorkspaceID, ModelID etc? If you make sure you filled those correctly, the script should work. You can find how to get those via this link: https://s3.amazonaws.com/anaplanenablement/Community/Anapedia/Anaplan_Connect_v1_4_3.pdf

    Hope this helps,

    Steven

  • Hi Steven,

     

    Yes, I have changed all the IDs in my actual code and yet it isn't working. I have also looked through the document but I'm not able to fix the error. 

     

    Thanks, 

    Veena 

  • Hi Veena,

    What kind of security are you using? I.e. certificate, SSO, default?

    Kr,

    Steven

  • Hi Steven,

     

    Could you please tell me how I can figure which kind of security I am using? 

     

    Thanks,

    Veena 

  • Hi @vprasad 

     

    are you using Anaplan connect 1.3.3.5 or 1.4.1?

     

    If is 1.4.1, the certificate line is missing.

     

    If is 1.3.3.5, just get rid of the "Serviceurl" and "Authurl" lines and use quotations for enclosing your name and password and it should work. An example of a working script for 1.3.3.5 here (for downloading an export from Anaplan):

     

    @echo off
    rem This example loads a source text file and runs an Anaplan import into a module.
    rem For details of how to configure this script see doc\Anaplan Connect User Guide.doc

    set AnaplanUser="name@domain.com:password"
    set WorkspaceId="12335578hh6"
    set ModelId="9ew8w490f89ee235245"
    set Operation=-export "name of the export at Anaplan's actions panel" -execute -get "C:\Anaplan_Connect_1.3.3.5\TEST.xlsx"

    rem *** End of settings - Do not edit below this line ***

    setlocal enableextensions enabledelayedexpansion || exit /b 1
    cd %~dp0
    if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
    set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
    @echo %Command%
    cmd /c %Command%
    pause

  • If this is Anaplan Connect 1.4 or later, then you need to have "-service %ServiceUrl% -auth %AuthUrl%" early in the Command line. Username/password authentication is still supported unless you use SSO to sign in.

    If this is Anaplan Connect 1.3 or earlier then make sure your password.does not contain a colon character - there is a server issue that should be resolved in the next release.

  • Hi,

     

    I am using 1.4.3 and I tried with the certificate as well, but still getting an error.

     

    Thanks, 

    Veena 

  • I will try that as well, thank you!