Forge macro listing spaces in developer site but not in production site

Hey folks :wave: I’m building a small macro to list the tags for a given space. When I deploy to my development Confluence site, everything works as expected (in the dropdown in my config, I see a list of all spaces in the site). When I get it installed in the company’s production/live Confluence site, the “space” dropdown I’ve created in my macro’s settings only lists one of the (several) spaces (that space is “public”). I don’t have permissions to install the macro myself (I’m providing the installation link from the developer console) and can’t find an answer in the docs re: whether it’s some permission issue that’s causing the change in behaviour, so asking here: does anyone know of a reason that all spaces wouldn’t be returned via the API in one site vs another? A gist with relevant code below:

More than likely it’s related to your asApp() usage. You might want to use asUser() method instead since that will run the search using the current user and not the app.


Aha, that was it! Thank you so much :pray: