To determine PR workflow agents based on the BADI, we are trying to get the users which have a particular business role assigned using CDS view “i_iambusinessuserbusinessrole”.
We can get the data if we query this CDS view in test mode but when this code is run via workflow it does not return anything, so it seems like some authorization issue for workflow user.