en en ms fi da da da da ca da da da ms hbs_lat ms ms ms en da da ms ms da es da de ro en da da da da de da da de en it da da da es da da en da da da en da sv de da en da en en en en en da pt fr fr en de en sv da da da da sv da da en en en en ms ms en de en nl en en en en en en en en en en en en en en en en en en en en en en en en en ceb ceb en ca en en en en en en en en en en en en en en en en en en en en en fr en en en en en en en en en en en en en en en en en en jv ms en en ms sco ms ms da da da da da en da da da da da en tr da ca en en id en en en en en en en en ms ms ms en en ml da nl en en nl nl da en da de de en en nl en en nl nl sv en da de de en en nl en en nl nl sv en da de de en en nl en en sv nl da en da de da en en nl en en nl nl sv en da da da en en nl en en nl nl sv en da da da en en nl en en nl nl sv en da de de en en nl en en nl nl da en da de de en en nl en en nl nl da en da de de en en nl en en nl en da ms en en en sv da fr da it de en ms ms en it da da de en en en sv da en da en da da en da da da hbs_lat da de de de el de en en tr en en en en en en en es es fi fr fr fr fr hu it it ja ko da nl nl pl pt pt ru sv th tr zh zh ar he
Announcing Power BI APIs .NET SDK v3 | Microsoft Power BI-blog | Microsoft Power BI
Office 365 + Power BI
We’re excited to announce te release of Power BI APIs .NET SDK v3.
Te new version is easier to use, have additional capabilities including te new credentials classes and easier way to encrypt credentials.
According to Microsoft Lifecycle Policy, as new versions are released, te previous version will eventually be retired. Te Power BI APIs .NET SDK v2 is now deprecated, and will be retired in 24 months (February 2022). We might make exceptions to this policy for service security or health reliability issues.
We strongly recommend that you migrate to te latest version as soon as possible, new APIs will only be added to te Power BI APIs .NET SDK v3.
v3 release is not compatible with previous versions, code changes are required when updating to v3.
Te Power BI APIs .NET SDK is released as Microsoft.PowerBI.Api NuGet package.
What you should know about v3
Here are te key changes with this version update:
Microsoft.PowerBI.Api.V2  was changed to Microsoft.PowerBI.Api
Microsoft.PowerBI.Api.Extensions.V2  was changed to Microsoft.PowerBI.Api.Extensions
Microsoft.PowerBI.Api.V1 namespace was removed.
SetAllConnections and SetAllConnectionsInGroup operations are deprecated and marked as obsolete.
You should use UpdateDatasources or UpdateParameters APIs instead.
PowerBI artifacts IDs typing was changed* from string to Guid, we recommend to work with Guid when possible.
*   Dataset ID is an exception and it’s typing will remain string.
‘ODataResponse[List[Object]]’ types was changed to ‘Objects’, thus returning an objects collection on responses.
For example, a response of ODataResponse[List[Report]] type will now return Reports collection as te return type.
New credentials classes allow easier build of credentialDetails. Te new classes include: `BasicCredentials`, `WindowsCredentials`, `OAuth2Credentials`, and more.
Read Configure credentials article to learn more.
New encryption helper classes for easier encryption when creating CredentialDetails.
For example, using AsymmetricKeyEncryptor class with a gateway public key:
GatewayPublicKey publicKey = new GatewayPublicKey
CredentialsBase credentials = new BasicCredentials(" ", " ");
var credentialsEncryptor = new AsymmetricKeyEncryptor(publicKey);
var credentialDetails = new CredentialDetails(credentials, PrivacyLevel.None, EncryptedConnection.Encrypted, credentialsEncryptor);
Read Configure credentials article to learn more.
Consistency on field names.
For example, reportKey, datasetKey, dashboardKey and tileKey was changed to reportId, datasetId, dashboardId and tileId.
Consistency on operations names.
For example, use GetDataset instead of GetDatasetById.
Te effected opertation names are imports, datasets, gateways and datasources.
Use enum class instead of string for enumerated types.
For example, In te generateTokenRequest, we recommend to use `TokenAccessLevel.View`, and not explicitly use “view” as value.
Required fields was marked – some fields was changed to required fields are not nullable anymore.
Change in Get Reports call if WorkspaceId is a string:
var reports = await client.Reports.GetReportsInGroupAsync(WorkspaceId);
var reports = await client.Reports.GetReportsInGroupAsync(new Guid(WorkspaceId));
Change in response handling if a string is expected:
report = reports.Value.FirstOrDefault(r => r.Id.Equals(ReportId, StringComparison.InvariantCultureIgnoreCase));
report = reports.Value.FirstOrDefault(r => r.Id.ToString().Equals(ReportId, StringComparison.InvariantCultureIgnoreCase));
Change in Generate token:
var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(WorkspaceId, report.Id, generateTokenRequestParameters);
var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(new Guid(WorkspaceId), report.Id, generateTokenRequestParameters);
Change in Generate token response handling if a string is expected:
Required fields are not nullable, i.e. Expiration is not nullable and te Value property should be removed:
var minutesToExpiration = EmbedToken.Expiration.Value – DateTime.UtcNow;
var minutesToExpiration = EmbedToken.Expiration – DateTime.UtcNow;
Consistency on operations names, i.e. use GetDataset instead of GetDatasetById:
var datasets = await client.Datasets.GetDatasetByIdInGroupAsync(WorkspaceId, report.DatasetId);
var datasets = await client.Datasets.GetDatasetInGroupAsync(new Guid(WorkspaceId), report.DatasetId);
That’s all for this post. We hope you found it useful.
We recommend that you start adopting Power BI APIs .NET SDK version 3 as soon as you can.
Please share your feedback with us, if you want to read more:
Power BI .NET SDK on GitHub
Power BI developer documentation
Power BI Embedded SDK
Tilmeld dig Power BI-nyhedsbrevet
Tilmeld dig nedenfor for at modtage de seneste nyheder fra Power BI direkte i din indbakke.
Land Afghanistan Albanien Algeriet Amerikansk Samoa Andorra Angola Anguilla Antarktis Antigua og Barbuda Argentina Armenien Aruba Aserbajdsjan Australien Bahamas Bahrain Bailiwick of Jersey Bangladesh Barbados Belgien Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnien-Hercegovina Botswana Bouvetøen Brasilien Brunei Darussalam Bulgarien Burkina Faso Burundi Cabo Verde Cambodja Cameroun Canada Caymanøerne Chile Cocosøerne (Keelingøerne) Colombia Comorerne Congo Cookøerne Costa Rica Côte d'Ivoire Curaçao Cypern Danmark De Amerikanske Jomfruøer De Amerikanske oversøiske øer De Britiske Jomfruøer De Forenede Arabiske Emirater Den Centralafrikanske Republik Den Demokratiske Republik Congo Den Dominikanske Republik Det Britiske Territorium i Det Indiske Ocean Det palæstinensiske selvstyre Djibouti Dominica Ecuador Egypten El Salvador Eritrea Estland Etiopien Falklandsøerne Fiji Filippinerne Finland Frankrig Fransk Guyana Fransk Polynesien Franske Oversøiske Områder Færøerne Gabon Gambia Georgien Ghana Gibraltar Grenada Grækenland Grønland Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard- og McDonaldøerne Honduras Indien Indonesien Iran Irland Island Isle of Man Israel Italien Jamaica Jan Mayen Japan Jordan Juleøen Kasakhstan Kenya Kina Kirgisistan Kiribati Korea Kosovo Kroatien Kuwait Laos Lesotho Letland Libanon Liberia Liechtenstein Litauen Luxembourg Madagaskar Malawi Malaysia Maldiverne Mali Malta Marokko Marshalløerne Martinique Mauretanien Mauritius Mayotte Mexico Mikronesien Moldova Monaco Mongoliet Montenegro Montserrat Mozambique Namibia Nauru Nederlandene Nepal New Zealand Nicaragua Niger Nigeria Niue Nordmakedonien Nordmarianerne Norfolk Island Norge Ny Kaledonien Oman Pakistan Palau Panama Papua Ny Guinea Paraguay Peru Pitcairn Polen Portugal Puerto Rico Qatar Reunion Rumænien Rwanda Saba Saint Barthélemy Saint Kitts og Nevis Saint Lucia Saint Martin Saint Pierre og Miquelon Saint Vincent og Grenadinerne Salomonøerne Samoa San Marino São Tomé og Príncipe SAR Hongkong SAR Macao Saudi-Arabien Schweiz Senegal Serbien Seychellerne Sierra Leone Singapore Sint Eustatius Sint Maarten Slovakiet Slovenien Somalia South Georgia og De Sydlige Sandwichøer Spanien Sri Lanka St. Helena, Ascension, Tristan da Cunha Storbritannien Sudan Surinam Svalbard Sverige Swaziland Sydafrika Sydsudan Syrien Tadsjikistan Taiwan Tanzania Tchad Thailand Timor-Leste Tjekkiet Togo Tokelau Tonga Trinidad og Tobago Tunesien Turkmenistan Turks- og Caicosøerne Tuvalu Tyrkiet Tyskland Uganda Ukraine Ungarn Uruguay USA Usbekistan Vanuatu Vatikanstaten Venezuela Vietnam Wallis og Futunaøerne Yemen Zambia Zimbabwe Ækvatorialguinea Østrig Ålandsøerne
Jeg vil gerne modtage Power BI-nyhedsbrevet. Erklæring om beskyttelse af personlige oplysninger.
Deltagelse kræver, at dine personlige oplysninger overføres til andre lande, som Microsoft driver forretning i, herunder USA. Når du sender denne formular, accepterer du overførslen af dine data uden for Kina. Erklæring om beskyttelse af personlige oplysninger.
Hvad er Power BI?
Power BI er en pakke med virksomhedsanalyseværktøjer til dataanalyse og vidensdeling. Overvåg din virksomhed, og få hurtigt svar med omfattende dashboards, der er tilgængelige på alle enheder.
Få de seneste nyheder fra Power BI-blog
Abonner via mail Du skal angive en gyldig mailadresse Du har angivet en personlig mailadresse. Angiv din arbejds- eller skolemailadresse. Noget gik galt. Prøv igen senere.
Beskyttelse af personlige oplysninger og cookies