Maximo Open Forum

 View Only
Expand all | Collapse all

MAS Authentication using postman

  • 1.  MAS Authentication using postman

    Posted 01-02-2025 11:00
    Edited by Rana Ahmed 01-02-2025 11:56

    I am trying to authenticate a user using postman with MAS (Manage).

    It works fine when using API key.

    My requirement is to authenticate using username and passsword.

    I tried the maxauth, basic or form based authentication from this guide IBM Maximo REST API Guide – Authentication but oes not seem to work.

    How do we authenticate users with MAS (Manage) using a username and password?

    Is it documented anywhere?

    How does Maximo mobile app does it


    #Integrations
    #MaximoApplicationSuite

    ------------------------------
    Rana Ahmed
    Maximomize
    ------------------------------



  • 2.  RE: MAS Authentication using postman

    Posted 01-03-2025 08:26

    I believe that Maximo Mobile authenticates against MAS Core and then uses that session for the sequential API calls into Manage. This approach would allow you to use native, LDAP, or SAML authentication even with MFA enabled. Getting into this type of authentication can get tricky quickly. I recommend sticking with a Manage level API key when interesting with those APIs.  



    ------------------------------
    Phil Runion
    Projetech
    ------------------------------



  • 3.  RE: MAS Authentication using postman

    Posted 01-07-2025 14:22

    Thanks API key works fine but I need to provide user access to certain things and I need to auth him via MAS and then read/ update certain OS. In that case creating api key for each user is not ideal.



    ------------------------------
    Rana Ahmed
    Maximomize
    ------------------------------



  • 4.  RE: MAS Authentication using postman

    Posted 01-07-2025 17:30

    You'll need to build an interactive UI like we do for Maximo Mobile or the MAF configuration to authenticate the session and then provide the x-access-token and other headers on subsequent requests to the /maximo/oslc (not /maximo/api) context. To the best of my knowledge, we don't have anything like this documented because how you implement it will be unique for your application. 

    The one piece I can share is how you register a new OpenID client. For the MAF configuration app, we don't register this out of the box so we documented how to do it here: https://ibm-mas.github.io/cli/commands/configtool-oidc/ . You would need to replace the various parameters with the correct settings including the TRUST_UI_PREFIX to be for your application. 



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 5.  RE: MAS Authentication using postman

    Posted 01-21-2025 08:47

    Thanks Steven,
    1. By interactive UI, can you explain it a bit more or point to some documentation.  
    2. Open ID client, will that only work one installation of MAS? 



    ------------------------------
    Rana Ahmed
    Maximomize
    ------------------------------



  • 6.  RE: MAS Authentication using postman

    Posted 01-21-2025 17:04

    SAML/OIDC (not OAUTH2 flows) are interactive authentication flows. They can't be used for machine-to-machine communications like you can with an API key. You need to provide the user a user interface to login using our standard login page (IE if you were using our desktop application of Maximo) that then redirects back to your application based on your OIDC setup that I linked to above. You capture the cookies in the redirect back to your application and provide them on subsequent requests. We don't document this because how you render the UI, capture the cookies, and everything else is going to be up to your application to do. 

    Every one of your instances (PROD, DEV, etc.) and/or every one of your customer instances would need to go through the setup process to register a new OIDC client. Your product, once this has been configured by their administrators, should be able to work for each of them with some sort of configuration to point to the MAS home URL. This is how Maximo Mobile is able to work once pointed to their MAS URL for example. 



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 7.  RE: MAS Authentication using postman

    Posted 02-28-2025 06:13
    On postman you can authenticate using a username and password by enabling this setting Follow Authorization header in the "Settings" of the request
     
    This helps to Retain authorization header (user/password) when a redirect happens to a different hostname (authentication url). 


    ------------------------------
    Achref Ghezil
    talan
    ------------------------------



  • 8.  RE: MAS Authentication using postman

    Posted 02-28-2025 08:41

    Hi Achref Ghezil,

    Can you explain it a bit more. 
    Which end point did you send the username and password. 
    and were you able to authenticate using user and password only?



    ------------------------------
    Rana Ahmed
    Maximomize
    ------------------------------



  • 9.  RE: MAS Authentication using postman

    Posted 02-28-2025 09:23

    I did it with this url for example https://<mas manage url>/maximo/oslc/os/mxapiasset and Basic auth header
    Basically,

    • when the Follow Authorization header setting param is disabled (which is the default setting) 
      Maximo does redirection to the mas core authentication service without the authorization header -> the MAs core authentication service redirect us to the login page.
    • when the Follow Authorization header setting param is enabled 
      the manage endpoint does the redirection to the mas core authentication with the authorization header -> the service generates some cookies and redirect back to the manage endpoint who uses these cookies to authenticate and send the response back.

    you can make the experience and track the traffic in the postman console to see what happens



    ------------------------------
    Achref Ghezil
    talan
    ------------------------------



  • 10.  RE: MAS Authentication using postman

    Posted 03-03-2025 15:14

    Thanks for the response. Is it possible to include a screenshot of this settings.
    I cannot find it in postman documentation. The closest thing I found is 
    Retain headers when clicking on links
    Thanks.



    ------------------------------
    Rana Ahmed
    Maximomize
    ------------------------------



  • 11.  RE: MAS Authentication using postman

    Posted 03-04-2025 08:36

    Hi Rana
    here is a screenshot 



    ------------------------------
    Achref Ghezil
    talan
    ------------------------------