Back to Publisher API Reference
pbjs.getUserIdsAsync()
To use this function, include the UserId module in your Prebid.js build.
getUserIdsAsync() returns a promise to the same value returned by getUserIds(), but it’s guaranteed to resolve only once the complete set of IDs is available:
pbjs.getUserIdsAsync().then(function (userIds) {
   // all IDs are available here:
   pbjs.getUserIds()       // same as the `userIds` argument
   pbjs.getUserIdsAsEids() 
});