User object does not return all the properties

User object does not return all the properties

rolandas_vegis
Advocate Advocate
643 Views
2 Replies
Message 1 of 3

User object does not return all the properties

rolandas_vegis
Advocate
Advocate

Hello, recently Application->currentUser() started not returning all properties on some computers.

It returns the correct userId, however displayName, email and userName are empty strings.

 

This only happens on some computers, not quite sure why it works on some and not on others.

0 Likes
Accepted solutions (1)
644 Views
2 Replies
Replies (2)
Message 2 of 3

rolandas_vegis
Advocate
Advocate
Accepted solution

The problem was when the add-in ran on startup and we tried to get the user data as soon as the add-in started, then the user data was empty.

Solved it by waiting until the user data was loaded.

Message 3 of 3

zxynine
Enthusiast
Enthusiast
How exactly did you wait? I need the data while building the command in run and ive hit the same problem
0 Likes