# Postman Ignored Swagger Security Definitons on Import

**URL:** <https://community.postman.com/t/postman-ignored-swagger-security-definitons-on-import/48002>\
**Category:** Help Hub\
**Tags:** authentication\
**Created:** [May 31, 2023, 1:30pm UTC](https://community.postman.com/t/postman-ignored-swagger-security-definitons-on-import/48002 "2023-05-31T13:30:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ba-tb](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@ba-tb](https://community.postman.com/u/ba-tb)\
**Post date:** [May 31, 2023, 1:30pm UTC](https://community.postman.com/t/postman-ignored-swagger-security-definitons-on-import/48002/1 "2023-05-31T13:30:01Z")

</div>

_My question_:  
Why does Postman ignore my Swagger security definitions?

_Details (like screenshots)_:  
In my swagger doc I have this security def:

```auto
securityDefinitions:
  OAuth2AccessCode:
    authorizationUrl: https://auth.example.net/oauth2/authorize
    flow: accessCode
    scopes:
      email: ' This scope value requests access to the email and email_verified Claims.'
      app/read: ' Grants read access.'
      app/write: ' Grants write access.'
      openid: ' This scope value enables OpenID Connect as an extension to the OAuth
        2.0 authorization process.'
      profile: ' This scope value requests access to the End-User''s default profile.'
    tokenUrl: https://auth.example.net/oauth2/token
    type: oauth2
  OAuth2Application:
    flow: application
    scopes:
      app/read: ' Grants read access.'
      app/write: ' Grants write access.'
    tokenUrl: https://auth.example.net/oauth2/token
    type: oauth2

```

and all endpoints contain a security def with scopes such as:

```auto
  /account:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/controllers.Account'
      security:
      - OAuth2AccessCode:
        - app/read
      - OAuth2Application:
        - app/read
      summary: List the details for your account.
      tags:
      - account

```

After importing into Postman, the collection is set to No Auth, and each endpoint is set to OAuth. Why is this being mangled after import?

_How I found the problem_:  
I wasn’t able to setup proper authorization through Postman without manually setting it.

_I’ve already tried_:  
I tried different import settings, but none of them respect the Swagger security definitions.

---

<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 22, 2025, 3:49pm UTC](https://community.postman.com/t/postman-ignored-swagger-security-definitons-on-import/48002/2 "2025-04-22T15:49:39Z")

</div>

Closed on April 22, 2025, 3:49pm UTC

Sorry we didn’t get to this sooner. This isn’t the experience we want for our users.

We’re closing out older posts to help keep the community organized and relevant. If this issue is still affecting you, please start a new topic with any updated details and we’ll be happy to help. Have you checked out [Spec Hub](https://community.postman.com/t/the-postman-drop-design-sync-and-manage-apis-without-the-switching-tax/78684) yet?
