Open Closed

The current user Id is null #3725


User avatar
0
Katherine created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: 6.0.0-rc.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

Step 1: obtaining the access token via postman

Step 2: Retrieving (GET) the information with the access token. I am unable to retrieve the current user information. Is there any way to get the Current User Id?

Kindly assist. Thanks

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    malik.masis created

    Hi, As far as I see your code, you signed your action as [AllowAnonymous] and tries to get the CurrentUser. So you can get null value. Could you check here, please? Regards

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Katherine created

    Hi,

    After removing the [AllowAnonymous] command, I received a 401 Unauthorized error. Do I miss any settings?

    Thanks

    <br>

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    malik.masis created

    Hi,

    It seems you should configure the auth side. Could you follow this guide, please?

    Regards

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Katherine created

    Hi,

    I found the answer already. 401 error is caused by missing scope when obtaining the access code via Postman. Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.