migueesc123 / PowerBIRESTAPI

A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API
MIT License
237 stars 74 forks source link

Gateway Data Source Users call produces error for AD groups without email address #104

Closed lbendlin closed 2 years ago

lbendlin commented 2 years ago

Looks like it is possible to add non-email enabled AD groups as gateway connection users. Currently the code produces an error

Expression.Error: The field 'emailAddress' of the record wasn't found. Details: datasourceAccessRight=Read displayName=[name of group] identifier=5a3bd1c4-50e9-xxxx-xxxx-e330f563ed51 principalType=Group

Note: The "identifier" field is filled, with the email address or group GUID. Might be advisable to add that field to the output.

klinejordan commented 2 years ago

Added some error handling to that query that should fix this, can you confirm? @lbendlin

klinejordan commented 2 years ago

105

lbendlin commented 2 years ago

@klinejordan confirmed. The "Data Source Permission Level" now comes back as "null" but that is a different story (I have raised an issue with Microsoft to get this corrected to include the new permission granularity).

klinejordan commented 2 years ago

Yeah, that's because these APIs don't support the new roles. There's some undocumented APIs that do, but I hesitate to use those in these connectors