# How to Fix unsupported\_grant\_type and 401 Unauthorized Errors with Infor OS ION API in Postman?

**URL:** <https://community.postman.com/t/how-to-fix-unsupported-grant-type-and-401-unauthorized-errors-with-infor-os-ion-api-in-postman/78355>\
**Category:** Help Hub\
**Tags:** tests, authentication\
**Created:** [April 10, 2025, 1:32pm UTC](https://community.postman.com/t/how-to-fix-unsupported-grant-type-and-401-unauthorized-errors-with-infor-os-ion-api-in-postman/78355 "2025-04-10T13:32:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsbadger](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rsbadger/32/29720_2.png) [@rsbadger](https://community.postman.com/u/rsbadger)\
**Post date:** [April 10, 2025, 1:32pm UTC](https://community.postman.com/t/how-to-fix-unsupported-grant-type-and-401-unauthorized-errors-with-infor-os-ion-api-in-postman/78355/1 "2025-04-10T13:32:50Z")

</div>

I am working on integrating with the Infor OS ION API Enterprise Quoting system using Postman v11.39.2 to retrieve data from the Quote and OrderLine endpoints. I’m encountering two persistent issues: an unsupported\_grant\_type error when fetching an access token and a 401 Unauthorized error when making API calls. I’ve made some progress but need help resolving these errors.

**Project Details**

```auto
API: Infor OS ION API Enterprise Quoting
Environment: [REDACTED_TENANT] (a test tenant)
Postman Version: v11.39.2
Authentication: OAuth 2.0 (initially using client_credentials, but the API seems to require password grant type)
Endpoints:
Token URL: https://[REDACTED_SSO_DOMAIN]:443/[REDACTED_TENANT]/as/token.oauth2
API Base URL: https://[REDACTED_API_DOMAIN]/[REDACTED_TENANT]/CPQEQ/RuntimeApi/EnterpriseQuoting/Entities
Target Endpoints: /Entities/Quote and /Entities/OrderLine

```

**Issue 1: unsupported\_grant\_type Error**  
When I attempt to fetch an access token using the client\_credentials grant type, I get the following error:

Request:

```auto
Method: POST
URL: https://[REDACTED_SSO_DOMAIN]:443/[REDACTED_TENANT]/as/token.oauth2
Grant Type: client_credentials
Authorization: Basic Auth with client_id and client_secret encoded in the header

```

Response:

```auto
{
    "error": "unsupported_grant_type",
    "error_description": "Unsupported grant type client_credentials. Expected one of password"
}

```

**Environment Variables (from my Postman environment):**

```auto
{
    "id": "[REDACTED_ENV_ID]",
    "name": "inforCPQ Copy",
    "values": [
        {
            "key": "tenant",
            "value": "[REDACTED_TENANT]",
            "type": "default",
            "enabled": true
        },
        {
            "key": "client_id",
            "value": "[REDACTED_CLIENT_ID]",
            "type": "default",
            "enabled": true
        },
        {
            "key": "client_secret",
            "value": "[REDACTED_CLIENT_SECRET]",
            "type": "default",
            "enabled": true
        },
        {
            "key": "token_url",
            "value": "https://[REDACTED_SSO_DOMAIN]:443/{{tenant}}/as/token.oauth2",
            "type": "default",
            "enabled": true
        },
        {
            "key": "api_base_url_new",
            "value": "https://[REDACTED_API_DOMAIN]/{{tenant}}/CPQEQ/RuntimeApi/EnterpriseQuoting/Entities",
            "type": "default",
            "enabled": true
        }
    ]
}

```

The error suggests that the API expects the password grant type instead of client\_credentials. However, I don’t have the username and password for the [REDACTED\_TENANT] tenant yet (I’ve requested them from the API team). In earlier tests, client\_credentials worked, so I’m unsure if the API configuration has changed.

**Issue 2: 401 Unauthorized Error**  
When I make a GET request to the Quote endpoint using an existing token, I get a 401 Unauthorized error because the token has expired:

Request:

```auto
Method: GET
URL: https://[REDACTED_API_DOMAIN]/[REDACTED_TENANT]/CPQEQ/RuntimeApi/EnterpriseQuoting/Entities/Quote

```

Response:

```auto
{
    "error": "Unauthorized"
}

```

**Token Details:**

```auto
iat: [REDACTED_TIMESTAMP] (a past timestamp)
exp: [REDACTED_TIMESTAMP] (a past timestamp, expired)
Request Time: [REDACTED_TIMESTAMP] (after token expiration)
The www-authenticate header confirms the token is invalid: Bearer realm="IONAPI", error="invalid_token".

```

**OpenAPI Specification**  
Here’s the relevant part of the OpenAPI specification for the `/Entities/{entityDefinitionName}` endpoint I’m trying to access:

```json
{
    "paths": {
        "/Entities/{entityDefinitionName}": {
            "get": {
                "summary": "Get a list of entity records",
                "parameters": [
                    {
                        "name": "entityDefinitionName",
                        "in": "path",
                        "description": "The name of the entity.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Action was successful.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "items": {
                                            "description": "An array of the entity record objects returned by the query"
                                        },
                                        "totalItems": {
                                            "description": "Total items returned by query"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Not authorized to execute the action."
                    },
                    "404": {
                        "description": "Entity record was not found."
                    }
                }
            }
        }
    }
}

```

**Steps I’ve Taken**  
Confirmed Endpoint: The /Entities/Quote and /Entities/OrderLine endpoints match the OpenAPI specification.  
Updated Grant Type: I tried switching to the password grant type in Postman, but I’m waiting on the username and password from the API team.  
Checked Token Expiration: The 401 Unauthorized error is due to an expired token, which I can’t refresh until I resolve the unsupported\_grant\_type issue.  
Verified Environment: My Postman environment variables are resolving correctly (e.g., token\_url and api\_base\_url\_new).

**Questions**

- How can I resolve the unsupported\_grant\_type error? Should I insist on using client\_credentials if it worked before, or is switching to password the correct approach?
- Once I get the username and password, how should I configure the password grant type in Postman to fetch a new token successfully?
- Are there any additional headers or parameters I might be missing for the /Entities/Quote and /Entities/OrderLine endpoints?
- If the entity name OrderLine is incorrect (e.g., I get a 404 Not Found after fixing authentication), how can I find the correct entity name for order lines in the Infor OS ION API?

**Additional Context**  
I plan to automate this process in a Python script using the requests library once I get the API calls working in Postman.  
I’ve already resolved a domain mismatch issue by updating the api\_base\_url\_new variable to match the token’s audience.  
Any help or suggestions would be appreciated! Thanks in advance.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 10, 2025, 2:57pm UTC](https://community.postman.com/t/how-to-fix-unsupported-grant-type-and-401-unauthorized-errors-with-infor-os-ion-api-in-postman/78355/2 "2025-04-10T14:57:54Z")

</div>

Hey @rsbadger 👋🏼

Welcome to the Postman Community :postman:

I’d be lying if I said I knew anything about that API or know anything about the structure of the requests.

Are you following any public documentation that could be shared?

You mentioned waiting for some credentials from you team to try so solve the password issue, have you been given those yet?

---

<div class="post-metadata">

**Author:** ![rsbadger](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rsbadger/32/29720_2.png) [@rsbadger](https://community.postman.com/u/rsbadger)\
**Post date:** [April 10, 2025, 4:03pm UTC](https://community.postman.com/t/how-to-fix-unsupported-grant-type-and-401-unauthorized-errors-with-infor-os-ion-api-in-postman/78355/3 "2025-04-10T16:03:02Z")

</div>

I’ve been told by my manager that the authentication credentials I’m using are correct. I can get access tokens manually using them. I cannot give Infor much credit for their documentation at any level (web portal, withing the API, etc). I am hoping for a developer’s feedback that works with Infor API’s. Beginning to feel like I’m fighting an uphill battle. I appreciate your prompt response to my plea for help.
