This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
We are applying Embedded RLS in our power bi report however, there is a limitation of characters we can send from Username (limit 256 Characters). But need to pass more than 256 characters. Using Java SDK.
The limitation of 256 characters for usernames in Power BI Embedded RLS is a hard limit imposed by the service, and there is no way to increase this limit.
However, if you need to pass more than 256 characters in your usernames, you could consider using a hashing algorithm to generate a unique and shorter identifier for each user. You can then use this identifier instead of the full username in your RLS rules.
To generate the unique identifier, you can use a cryptographic hash function such as SHA-256 or MD5 to generate a hash of the user's full name or email address. The resulting hash value will be a fixed length and can be used as a key to identify the user in your RLS rules.
Here's an example Java code that shows how to generate a SHA-256 hash of a string:
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class HashingExample {
public static void main(String[] args) throws NoSuchAlgorithmException {
String input = "user@example.com";
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(input.getBytes(StandardCharsets.UTF_8));
String hexHash = bytesToHex(hash);
System.out.println(hexHash); // use this value as the user identifier in your RLS rules
}
private static String bytesToHex(byte[] bytes) {
StringBuilder hex = new StringBuilder(2 * bytes.length);
for (byte b : bytes) {
hex.append(String.format("%02x", b));
}
return hex.toString();
}
}
This code generates a SHA-256 hash of the string "user@example.com" and prints the resulting hash value as a hexadecimal string. You can modify this code to generate hashes for your own user names or email addresses. Just make sure to use a secure and widely-used hash function and to keep the salt value consistent across all users.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 14 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |
| User | Count |
|---|---|
| 33 | |
| 28 | |
| 26 | |
| 19 | |
| 16 |