Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18011

FeatureNotAvailableError while trying to get RLS to work

$
0
0

Hey guys,

 

I am desperate for help!!!!!! I keep getting this error when trying to get a report access token:

 

Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'NotFound'

 

The Power BI service also returns the following JSON:

{

    "error":

    {

         "code":"FeatureNotAvailableError",

         "pbi.error":

          {

              "code":"FeatureNotAvailableError",

              "parameters":{},

              "details":[]

          }

     }

}

 

Here is my code:

 

                    GenerateTokenRequest tokenParam = new GenerateTokenRequest(

                        accessLevel: "view",

                        identities: new List<EffectiveIdentity>

                                    {

                                        new EffectiveIdentity(

                                            username: "bill",

                                            roles: new List<string> { "SalesRep" },

                                            datasets: new List<string> { "8aefbacc-06e5-4261-89bc-e6aba598d0b2" } )

                                    }

                        );

 

                    EmbedToken embedToken = client.Reports.GenerateTokenInGroup(groupId, reportId, tokenParam);

 

The code runs without error if I remove the "identities" parameter from GenerateTokenRequest. But I need it there in order for RLS to work.

 

Some background info: I am connecting to Power BI service in China which uses a different api URL: https://api.powerbi.cn . Has this anything to do with the error? (i.e. RLS not availalbe in China?).

 

Also, I am using the latest version of Power BI SDK v2.0.11 (updated from NuGet).

 

I really appreciate for any help. Thanks in advance.


Viewing all articles
Browse latest Browse all 18011

Trending Articles