Configuring Authentication to SAP LeanIX APIs in Postman

Configure OAuth 2.0 authentication to SAP LeanIX APIs for a collection in Postman.

Overview

This document provides instructions for configuring OAuth 2.0 authentication to SAP LeanIX APIs for a collection in Postman. The configuration applies to both REST and GraphQL protocols.

Postman is an API platform for building and using APIs. For more information, refer to the Postman documentation.

Prerequisites

Before you start, do the following:

Procedure

  1. Select the collection for which you want to configure authentication. If needed, create a new collection.

  2. On the collection page, navigate to the Authorization tab.

  3. In the Type list, select OAuth 2.0.

  4. Under Configure New Token, click Edit token configuration and specify the following details:

    • Token Name: Enter a name for the token.
    • Grant Type: Select Client Credentials.
    • Access Token URL: Enter the following URL of the authentication endpoint: https://{SUBDOMAIN}.leanix.net/services/mtm/v1/oauth2/token. Replace {SUBDOMAIN} with your SAP LeanIX subdomain. You can copy the subdomain value from the URL of your workspace.
    • Client ID: Enter apitoken.
    • Client Secret: Enter the API token that you obtained by creating a Technical User.
    • Client Authentication: Select Send as Basic Auth header.
    Configure a new token for authentication in Postman.

    Configuring a New Token for OAuth 2.0 Authentication in Postman

  5. To save the changes that you applied to the collection, click Save.

The authorization method that you configured will be used for every request in the collection.

To request a new access token, click Get New Access Token.