const token = await axios.post(`${process.env.KEYCLOAK_URL}/realms/${process.env.KEYCLOAK_REALM}/protocol/openid-connect/token`, new URLSearchParams({
grant_type: 'client_credentials',
client_id: process.env.KEYCLOAK_CLIENT_ID,
client_secret: process.env.KEYCLOAK_CLIENT_SECRET,
}))
I am getting PAT using above endpoint and then I am adding resource using below endpoint
const result = await axios.post(`${process.env.KEYCLOAK_URL}/realms/${process.env.KEYCLOAK_REALM}/authz/protection/resource_set`, {
name: id,
owner: userName,
ownerManagedAccess: true,
},{
headers: {
Authorization: `Bearer ${token.data.access_token}`,
'Content-Type': 'application/json',
},
})
Even though resource is visible in Authorization->Resources ( backend client ) and assigned to particular user I cannot see it in user managment interface
