Anaplan Connect Using Linux Script(Certificate Based Authentication)
Hi Team,
I am working on Anaplan Connect on Linux Platform tried run with credentials it worked, however, i am unable to run with certificate authentication.
Getting an error" -certificate is unknown token"
Please find the below code.
#!/bin/sh
# This example uploads a file and runs an import
WorkspaceId="'8a01b09d5v0b3c1c015a1eca06aa296d'"
ModelId="'77C397ECk35B4A238A5939B42tE098BC'"
Operation="certificate '/home/suk/Downloads/adar/anaplan-connect-1-3-3-5/anaplan.cer' -file 'sales.txt' -put '/home/suk/Downloads/adar/anaplan-connect-1-3-3-5/sales.txt' -import 'sales from sales.txt' -execute -output '/home/suk/Downloads/adar/anaplan-connect-1-3-3-5/Error/error.txt'"
#____________________________ Do not edit below this line ______________________________
if [ "${AnaplanUser}" ]; then
Credentials="-user ${AnaplanUser}"
fi
echo cd "`dirname "$0"`"
cd "`dirname "$0"`"
if [ ! -f AnaplanClient.sh ]; then
echo "Please ensure this script is in the same directory as AnaplanClient.sh." >&2
exit 1
elif [ ! -x AnaplanClient.sh ]; then
echo "Please ensure you have executable permissions on AnaplanClient.sh." >&2
exit 1
fi
Command="./AnaplanClient.sh ${Credentials} -workspace ${WorkspaceId} -model ${ModelId} ${Operation}"
/bin/echo "${Command}"
exec /bin/sh -c "${Command}"
Comments
-
Add -(hyphen) before certificate in operation and use the same action name in command(highlighted in green).
Try the below code or you can also create a variable to initialize the certificate location, it can be used throughout the script.
#!/bin/sh
# This example uploads a file and runs an import
WorkspaceId="'8a01b09d5v0b3c1c015a1eca06aa296d'"
ModelId="'77C397ECk35B4A238A5939B42tE098BC'"
Operation="-certificate '/home/suk/Downloads/adar/anaplan-connect-1-3-3-5/anaplan.cer' -file 'sales.txt' -put '/home/suk/Downloads/adar/anaplan-connect-1-3-3-5/sales.txt' -import 'sales from sales.txt' -execute -output '/home/suk/Downloads/adar/anaplan-connect-1-3-3-5/Error/error.txt'"
#____________________________ Do not edit below this line ______________________________if [ "${AnaplanUser}" ]; then
Credentials="-user ${AnaplanUser}"
fi//Remove thisecho cd "`dirname "$0"`"
cd "`dirname "$0"`"
if [ ! -f AnaplanClient.sh ]; then
echo "Please ensure this script is in the same directory as AnaplanClient.sh." >&2
exit 1
elif [ ! -x AnaplanClient.sh ]; then
echo "Please ensure you have executable permissions on AnaplanClient.sh." >&2
exit 1
fi
Command="./AnaplanClient.sh ${certificate} -workspace ${WorkspaceId} -model ${ModelId} ${Operation}"
/bin/echo "${Command}"
exec /bin/sh -c "${Command}"1 -
Thanks @patilchhaya the solution worked..!!
0
Categories
- All Categories
- 2.3K Anaplan Community
- Academy
- Anaplan Talent Builder
- Model Design Course
- The Anaplan Way
- Archive
- 2 Idea exchange
- 62 Enterprise Scale
- 1.1K Extensibility
- 21 Intelligence
- 1.6K Planning & Modeling
- 331 Security
- Community Connections
- Connections
- Experiences
- Groups
- Personas
- Employees
- CS Toolkit
- Customer Care Center
- Forums
- Academy & Training
- Community Feedback & Updates
- Japan
- Anaplan Community Japan
- Anaplan Community Japan Knowledge Base
- HyperCare Japan
- JP-Central
- Support-Japanese
- Partners
- Partner Leadership Council
- Partner Product Council
- 724 Platform
- Anapedia
- App Hub
- Centers Of Excellence
- Extensions
- Planual
- Platform Updates
- 724 User Experience
- Profile Builder
- Resources
- Anaplan Advocates
- Anaplan Live!
- Community
- Community Advancement
- Community Connections
- Partner Program
- The Official Master Anaplanner Program
- Videos
- Welcome to the Anaplan Community!
- Success Central
- Support
- Case Portal Link
- Common Support Questions
- HyperCare Redirect
- Known Issues and Workarounds
- Support test page
- SupportFAQ
- Survey
- 2 Training Day Takeaways