Unable to Connect Using Basic Authentication : Says Invalid Credentials

New Contributor

Unable to Connect Using Basic Authentication : Says Invalid Credentials

 

This is my first time using Anaplan Connect 

 

My Batch File 

 

@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="sripad.lokapure@abc.com"
set WorkspaceId="8a81b09b551d26df01554fc9454b4072"
set ModelId="CCCFC60814F543AE815FB720245C3B0A"
set Operation=-file "employee.csv" -put "C:\Anaplan_test\employee.csv" -import "Employee_List from employee.csv" -execute -output "C:\Anaplan_test\My Errors.txt"
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

 

After running this batch file it asks me for 

 

Anaplan Auth-Service URL:

 

I tried entering :

https://api.anaplan.com 

:https://auth.anaplan.com

and the sdp.frontdoor URL

 

But it always says credentials are invalid

Can you Guide me where I am going wrong

 

Thanks

 

Regards

 Sripad 

Message 1 of 6
5 REPLIES 5
Regular Contributor

Re: Unable to Connect Using Basic Authentication : Says Invalid Credentials

Hi,

 

Best practice would be to hard-code the auth and service URLs directly into the Command variable:

 

set ServiceUrl="https://api.anaplan.com"

set AuthUrl="https://auth.anaplan.com"

 

set Command=.\AnaplanClient.bat %Credentials% -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% %Operation%

 

Make these changes and try using your username and password again, and let us know whether you're able to successfully authenticate.



Jesse Wilson
Solution Architect - Data Integrations
Singapore
Message 2 of 6
New Contributor

Re: Unable to Connect Using Basic Authentication : Says Invalid Credentials

Hi

Thanks for your response I tries as you said I'm getting a 404 error when trying to login

Please find the console info below

 

.\AnaplanClient.bat -user "sripad.lokapure@gartner.com" -service "https://api.anaplan.com" -auth "https://auth.anaplan.com" -workspace "8a81b09b551d26df01554fc9454b4072" -model "CCCFC60814F543AE815FB720245C3B0A" -file "employee.csv" -put "C:\Anaplan_test\employee.csv" -import "Employee_List from employee.csv" -execute -output "C:\Anaplan_test\My Errors.txt"
Absolute path to JAVA 8 executable not provided. Will attempt to figure out path from JAVA_HOME or Windows registry...
JAVA_HOME is not defined, will attempt to fetch value from registry...
Checking Windows Registry for Java Version...
Checking Windows Registry for JAVA_HOME...
JAVA_HOME is C:\Program Files\Java\jre1.8.0_211
Found Java executable from JAVA_HOME , at C:\Program Files\Java\jre1.8.0_211\bin\java.exe...
Current Java version = 1.8
Current Java version is valid for Anaplan Connect.
Running Anaplan Connect...
Using Class-Path: C:\Anaplan_Connect\anaplan-connect-1.4.1-jar-with-dependencies.jar
Password:
2019-05-09 07:48:46 INFO  16128 |-- Initializing Service...
2019-05-09 07:48:46 INFO  16128 |-- Authenticating via Basic...
2019-05-09 07:48:50 ERROR 16128 |-- Server files not found: Server-Files not found for Model-ID=CCCFC60814F543AE815FB720245C3B0A (Feign: status 404 reading AnaplanAPI#getServerFiles(String,String,int); content:
{
"status": {
"code": 404,
"message": "Resource not found"
}
})
Press any key to continue . . .

 

Thanks

 

Regards

 Sripad Lokapure

Message 3 of 6
Regular Contributor

Re: Unable to Connect Using Basic Authentication : Says Invalid Credentials

Hi @sripadlokapure,

 

Does your workspace have Single Sign-On, if so you'll need to make yourself an exception user or you won't be able to authenticate with our auth server to use Anaplan Connect.

 

If that's not the case, please contact our Support team. I did some investigation and see that everything else checks out, so you should be able to access this model as long as you're not using SSO.

 

Thanks



Jesse Wilson
Solution Architect - Data Integrations
Singapore
Message 4 of 6
Highlighted
New Contributor

Re: Unable to Connect Using Basic Authentication : Says Invalid Credentials

Hi

Thanks for your response I tries as you said I'm getting a 404 error when trying to login

Please find the console info below

 

.\AnaplanClient.bat -user "sripad.lokapure@gartner.com" -service "https://api.anaplan.com" -auth "https://auth.anaplan.com" -workspace "8a81b09b551d26df01554fc9454b4072" -model "CCCFC60814F543AE815FB720245C3B0A" -file "employee.csv" -put "C:\Anaplan_test\employee.csv" -import "Employee_List from employee.csv" -execute -output "C:\Anaplan_test\My Errors.txt"
Absolute path to JAVA 8 executable not provided. Will attempt to figure out path from JAVA_HOME or Windows registry...
JAVA_HOME is not defined, will attempt to fetch value from registry...
Checking Windows Registry for Java Version...
Checking Windows Registry for JAVA_HOME...
JAVA_HOME is C:\Program Files\Java\jre1.8.0_211
Found Java executable from JAVA_HOME , at C:\Program Files\Java\jre1.8.0_211\bin\java.exe...
Current Java version = 1.8
Current Java version is valid for Anaplan Connect.
Running Anaplan Connect...
Using Class-Path: C:\Anaplan_Connect\anaplan-connect-1.4.1-jar-with-dependencies.jar
Password:
2019-05-09 07:48:46 INFO  16128 |-- Initializing Service...
2019-05-09 07:48:46 INFO  16128 |-- Authenticating via Basic...
2019-05-09 07:48:50 ERROR 16128 |-- Server files not found: Server-Files not found for Model-ID=CCCFC60814F543AE815FB720245C3B0A (Feign: status 404 reading AnaplanAPI#getServerFiles(String,String,int); content:
{
"status": {
"code": 404,
"message": "Resource not found"
}
})
Press any key to continue . . .

 

Thanks

 

Regards

 Sripad Lokapure

Tags (1)
Message 5 of 6
New Contributor

Re: Unable to Connect Using Basic Authentication : Says Invalid Credentials

this worked when I tried on the previous 1.3 version

 

Message 6 of 6