This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Rest API on 7.1 cannot authenticate

Hi all,

I'm trying to access my IM through web  API:

if I get  appserver/authmodules

it returns

 
Id Caption Password Based Is Default
RoleBasedManualADS Active Directory user account (manual input/role based) false false
RoleBasedADSAccount Active Directory user account (role based) false false
DialogUser System user false true
RoleBasedPerson Employee (role based) false false
ADSAccount Active Directory user account false false
DynamicPerson Employee (dynamic) false false

I'm trying to use the DialogUser method

in the follow way:

calling auth/apphost

with in the body the following json as decribed in the documentation:

{"authString":"Module=DialogUser;User=*SystemUsername*;Password=*SystemUserPassword*"}

 

but I get a 401 - Unauthorized: Access is denied due to invalid credentials

 but the user is an admin user and has all the privileges.

Should I enabled the user to something?

 

Thanks Mik

Parents
  • 1)Can i disabled it? Just the firse authentication part?
    2) Or How can I force an autenthication from a web based application to autenthicate agaist the domain before send the username and password from json?
    3) If I get autenthicate in the answer from the server I get this (IN dev I have ton restriction so it works) :

    {
    "claims": {
    "schemas.dell.com/.../identifier": "CCCAdmin",
    "schemas.dell.com/.../useruid": "CCC-65E9B3D39FFE925C4D7747A69876C128",
    "schemas.dell.com/.../module": "DialogUser",
    "schemas.dell.com/.../product": ""
    },
    "passwordBased": true,
    "moduleDisplay": "System user",
    "sessionId": "t0w0JxsyplKZiqqlEQz7",
    "userName": "CCCAdmin",
    "responseStatus": {}
    }

    I think the sessionId is what I need to call API as authenitcated user. But where I have to put it in the request? as header?
    I'd like to use a javascript framework the interrogate rest service with ajax request.

    If I put in a ajax post request the json upon as body of the request it works but how I have to do for get requests?

    Mik

  • Hi Mik,

    if you take a look at the PowerShell examples from the REST API documentation you will see that you need to work with session variables. You need to save the successful authentication in a session variable that needs to be passed to every subsequent call against the REST API.

Reply
  • Hi Mik,

    if you take a look at the PowerShell examples from the REST API documentation you will see that you need to work with session variables. You need to save the successful authentication in a session variable that needs to be passed to every subsequent call against the REST API.

Children
No Data