Does anyone know another way to call other (user-search) endpoints within forge. Or can you (@atlassian) tell us when we will be able to add the call these rest endpoints within forge?
I am also experiencing this issue - for reference using Forge Custom UI. Did you get a solution for this @spall ?
If you are using UI-Kit, consider the UserPicker, however our use case requires Custom-UI.
Edit: Within the Confluence Cloud REST API > Search Users > Forge, the following comment is added:
Other User retrieval endpoints (such as GET /wiki/rest/api/user) do not talk about lack of Oauth2 support, and these endpoints do not return a 401 response from the app. Basic Auth would return a 403 Forbidden response, as the cql search requires a User?
I wonder if this is a known issue or @atlassian are aware and have a workaround solution?
@spall Hopefully Atlassian can respond soon to know whether this is intended and they can suggest a workaround, or if this is a problem that will be resolved for Forge CustomUI.
In the meantime, if you are still interested, it can be achieved using Node.js ‘fetch’ (Conf REST API has a section at the Search Users endpoint). This allows basic auth for a proof of concept if you still aim to use Forge for cloud development. (Hoping that a workaround/fix is provided as the Basic auth uses hardcoded credentials, limiting ‘asUser’/‘asApp’ contextual methods to be used!
Hi @DennyMiller,
many thanks for the hint. Can confirm that
“Getting Users by name or ID” can be replaced by:
…requestConfluence(/rest/api/search?cql=user.accountId="${userId}"…
and "When searching for Users"can be replaced by:
…requestConfluence(/rest/api/search?cql=user.fullname~"${inputValue}",…