How to use Postman with the IdentityServer4 auth example?

I’ve got the following example working great in the browser:

Using IdentityServer4 Auth in ServiceStack

However, I now want to use Postman to call the API part of this example, but for the life of me can’t figure out how to get Postman to use the credentials provided by the IdentityServer part of this app.

I followed the article here:

IdentityServer4 Postman

And got as far as it being able to authenticate against IdS4 and pulling down the credentials, but I keep getting a 401 on the /requiresauth call.

I even tried just grabbing the .Token.access_token value for Alice and pasting it into Postman as a Bearer token, but still getting a 401.

So I’m not sure where the problem is. Since the IdentityServer part is seemingly succeeding, it seems to point to the ServiceStack API included in this project expecting something it’s not getting from this approach.

Any help you can provide would be appreciated.

You’ll have to ask Identity Server how to call it within postman, the requests should be made directly to Identity Server endpoints (i.e. not ServiceStack’s). You may want to compare what’s different about your Postman requests vs the normal Web Requests.