Open Closed

how to get user id in angular #9302


User avatar
0
smwasimraja@gmail.com created

when i login the page the response from api provides token only i want to get uniqueid of the user from the token how do i achieve that

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

2 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Can you try to access current user by API that is provided by ABP: https://abp.io/docs/latest/framework/ui/angular/current-user

    currentUser object has id field on it

    
    const currentUser = this.config.getOne("currentUser");
    
    console.log(currentUser.id);
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    smwasimraja@gmail.com created

    const c

    thanks its working

    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 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.