Skip to main content
Question

What is the box-node-sdk call to get devicepins for a user?

  • May 21, 2025
  • 1 reply
  • 5 views

Forum|alt.badge.img

I'm trying to figure out how to get devicepins for a given user like you see in the enterprise admin console when you search a user's name.

 

I only see how to get all devicepins (which there's a lot) and use the next_marker to page through it but I don't see a way to filter it by user.

 

adminAPIClient.devicePins.getAll(filter, function(err, data) {
    res.render('devicepins', {
      error: err,
      errorDetails: util.inspect(err),
      devicepins: data ? data.entries: [],
      marker: data.next_marker
    });
});

Here's my sample app ui:

BOX_q3ihsm5t4k3iv9k3nhekzs1tgpn0n4y5.png

1 reply

Forum|alt.badge.img

So I took 's advice and ended up getting all device pins since there's no api to filter by name and this seems to work.

 

app.get('/devicepins', ensureAuthenticated, function(req, res) {
  var list = [];
  getDevicePins(null, list)
    .then(function() {
      var result = [];
      for (var i=0; i

 BOX_prc96abh56cagjeejc4waupqmssk0dsb.png