Rest API throwing "Principal is not authorized" error.
@JaredDolich
Hi I am a beginner who just finished Model builder Lv1.
This is my first post and forgive me suddenly mentioning you. I learned a lot from your answers to many query and I wish you could help me.
Rest API throwing "Principal is not authorized" error.
However same user name and password when used to login to front end portal that works.
So is there anything that we need to enable/do some settings for the user, so that user can call Anaplan APIs?
====Problem====
・When I executed the Audit API, the response(failure) came back.
{
"status": "FAILURE_INVALID_TOKEN",
"statusMessage": "Principal is not authorized"
}
====Steps followed====
(1)Generate a Authorization Token using following command.
curl -X POST --user [My account(Gmail)]:[My password] https://auth.anaplan.com/token/authenticate
(2)In Postman, set the following request URL.
https://audit.anaplan.com/audit/api/1/events
(3)In Postman, set the following Header KEY/VALUE
KEY : Authorization
VALUE: AnaplanAuthToken [My Token Value]
Comments
-
Dear @JaredDolich
Thank you very much for your warm reply !
From your reply I understood that there are 2 versions of API, V1.3 and V2.
And V1.3 uses Basic Authentication and V2.0 uses Token Authentication.
Actually I was trying to use the Audit API, which I am not sure whether it's V1 API or V2 API,
but reading the documentation, it seems this API requires not only Token, but also "Tenant Auditor" role.So giving "Tenant Auditor" role might be my final solution.
And as you mentioned, the Token is only valid for about 10 minutes so, I am wondering what is best approach to automatically refresh the tokens.. which is another topic..
Anyway, thank you very much for your reply!
Best Regards,
Yazaki0
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