Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Rest API authentication – Unauthorized

EcoStruxure IT forum

Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure IT
  • EcoStruxure IT forum
  • Rest API authentication – Unauthorized
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
Cory_McDonald
Admiral Cory_McDonald Admiral
124
Jef
Admiral Jef Admiral
108
gsterling
Captain gsterling Captain
71
APC_Steve
Captain APC_Steve Captain
62
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to EcoStruxure IT forum
Solved
shloa
Ensign shloa
Ensign

Posted: ‎2022-02-08 05:26 AM . Last Modified: ‎2022-10-19 01:07 AM

0 Likes
6
2599
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-08 05:26 AM . Last Modified: ‎2022-10-19 01:07 AM

Rest API authentication – Unauthorized

Hi,

 

When I tried to connect to api as describe in https://community.se.com/t5/EcoStruxure-IT-forum/are-there-any-examples-for-DCO-RestFul-API-usage-So... 

 

I run:

curl -X GET --header 'Accept: application/json' 'https://<username>:<password>@<ServerIP>/api/v8.1/assets/search?q=<assetname>' -k 

 

I got

Error: Unauthorized

 

The password does not contain special characters 

 

What can be the problem?

 

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
shloa
Ensign shloa
Ensign

Posted: ‎2022-02-15 01:00 AM

In response to gsterling
0 Likes
1
2535
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-15 01:00 AM

Hi,

 

I asked to add another  new account. This account also did not worked ether.

Then we understood that all the account that have access to API  must belong to a specific LDAP group. After the new account added to that group everything works.

I dont know how I worked at all with the old account for a while.

 

Now it's working.

Thx.

See Answer In Context

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 6
CraigEl
Administrator CraigEl Administrator
Administrator

Posted: ‎2022-02-08 02:23 PM

0 Likes
0
2586
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-08 02:23 PM

I'm not familiar with the product but it appears that the password does not meet the password policy.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

gsterling
Captain gsterling Captain
Captain

Posted: ‎2022-02-09 04:01 AM

0 Likes
4
2573
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-09 04:01 AM

Hello, the overall syntax you specified should work. I'm able to use the syntax against my own server.

 

curl -X GET --header 'Accept: application/json' 'https://<username>:<password>@<ServerIP>/api/v8.1/assets/search?q=<assetname>' -k 

 

Couple of notes. As the other responder mentioned, unauthorized is a sign something is wrong with the credentials you specified or the access the user has in ITA.

 

The user account must be an ITA based user account, not a linux user. The user must be present in the users view of the ITA web client UI. The user must also have access to the data you're trying to access as the users permissions inside ITA determine the access the user has with REST.

 

Regards

 

Greg Sterling

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

shloa
Ensign shloa
Ensign

Posted: ‎2022-02-13 06:09 AM

In response to gsterling
0 Likes
3
2545
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-13 06:09 AM

Hi,

 

I was able to  connect to the api  from web browser and now it's stoped too.

The administrator said my user defined as any other users. 

But  I saw that other users can connect to the api from a web browser and also with curl!

 

What I need to check in my account definition? and what happen that it worked from web and suddenly stop working?

 

Thanks.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

gsterling
Captain gsterling Captain
Captain

Posted: ‎2022-02-14 07:00 AM

In response to shloa
0 Likes
2
2538
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-14 07:00 AM

If you cannot login to the ITA web client UI, then something is wrong with your account.

 

You are trying to login via the web client UI, using https://<ita-server>/, correct?

 

Is your user account local to ITA, or tied to Active Directory or LDAP.? 

 

The permissions you have with REST api are based on the permissions defined in ITA, so solving the ability to logon to the web UI must occur first.

 

Regards

 

Greg Sterling

 

 

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

shloa
Ensign shloa
Ensign

Posted: ‎2022-02-15 01:00 AM

In response to gsterling
0 Likes
1
2536
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-15 01:00 AM

Hi,

 

I asked to add another  new account. This account also did not worked ether.

Then we understood that all the account that have access to API  must belong to a specific LDAP group. After the new account added to that group everything works.

I dont know how I worked at all with the old account for a while.

 

Now it's working.

Thx.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

gsterling
Captain gsterling Captain
Captain

Posted: ‎2022-02-15 03:48 AM

In response to shloa
0 Likes
0
2525
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-02-15 03:48 AM

Thanks for the update. We will assume your problem is now solved.

 

Regards

 

Greg Sterling

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of