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


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);
    
  • User Avatar
    0
    smwasimraja@gmail.com created

    const c

    thanks its working

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 v9.3.0-preview. Updated on June 13, 2025, 11:37