Документация Майкрософт — новейшие статьи

Теперь техническая документация Майкрософт размещена на сайте docs.microsoft.com. Мы модернизировали не только веб-интерфейс, но и методы создания и поддержки материалов, которые помогают вам обучаться, развертывать решения и управлять ими. Это централизованное расположение для всего содержимого, связанного с технологиями Майкрософт. Чтобы вы не пропустили самые актуальные новости и интересные публикации на сайте docs.microsoft.com, мы предусмотрели для вас возможность выбрать требуемый веб-канал.


Selected Feed: .NET

Visual Studio BackgroundDownload.exe using all the system resources - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193782/visual-studio-backgrounddownload-exe-using-all-the *I know there are many questions on Stackoverflow, for example, but I can't really seem to trust the answer for some reason. I must disable some Windows Task for what I need, but it looks like I might have problems with Visual Studio later, so to confirm that it is safe to do, I posted a question here. On Visual Studio Developer Community, it gets a bit confusing when someone is answering someone's/my question. I am using Visual Studio 2022, installed it 3 months ago. The only workload I have there installed is .NET Desktop Development, because I am a C# programmer. I like this IDE. Though, the only thing is, when the system itself is idle, the laptop's CPU fans start to get loud for a bit. If I look at the Task Manager in time, I can see BackgroundDownload.exe spawning and loading 100% of CPU and Disk, despite that my laptop has an SSD with a speed up to 500MB R/W, and a Ryzen 7 CPU, still uses 100% of system resources. It is very annoying that I have to always put my laptop on sleep mode. Otherwise, BackgroundDownload.exe keeps starting and closing itself again, again, and again. It also creates folders in %TEMP%. These folders occupy 40MB of Disk Space and get cleaned up to 72KB later, though sometimes the size of the user temp folder is insane due to directories Visual Studio creates for BackgroundDownload.exe. Their names is just a string with random characters, + a dot and 3 more random characters. So my question is, how do I prevent BackgroundDownload.exe from running in the background again?
Published Date : 28 марта 2023 г.

Tray Icon Visibility Setting Resets After WPF App Update - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193773/tray-icon-visibility-setting-resets-after-wpf-app I'm working on a .NET 6.0 WPF application with a tray icon (WinForms). After updating the app via ms-appinstaller, the tray icon's visibility setting in the Taskbar resets, moving it back to the hidden area. The package info (name, publisher, certificate, ProjectGuid) remains the same. How can I prevent this behavior and maintain the icon's visibility setting across updates? Thanks for any advice.
Published Date : 28 марта 2023 г.

How to install certificate automatically on user machine? - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193771/how-to-install-certificate-automatically-on-user-m I'm a .NET developer and am having issues with Windows security. Every time a user clicks on my app, Windows shows a warning and forces them to choose. This is very annoying and feels unsafe. After searching the Internet, I tried installing the certificate on my personal computer and the warning disappeared. So I thought if it was possible to install the certificate automatically on the client machine, it would solve the above problem. If there is a solution please comment below. Thank you.
Published Date : 28 марта 2023 г.

Mail functionality breaks in Azure Web Apps - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193756/mail-functionality-breaks-in-azure-web-apps Hello! I have recently started working on an ASP.NET Core application that is to be deployed as an Azure Web App. As part of the App, we need some sort of mailing functionality in order to notify customers upon purchases. However, every part of code that I write that handles mailing works while building locally, and breaks upon deploying the actual App Service. Is there something I am missing? Between System.Net.Mail, Sendgrid, Sendgrid's API as well as Mimekit/Mailkit, I have not been able to send SMTP-Emails at all, even with just "This is a test" as the most barebone implementation possible. The idea I had was that, as we are using the Microsoft Identity Platform to authenticate user access to our app, maybe that ahs something to do with it? But I'm not sure how to remedy the problem.
Published Date : 28 марта 2023 г.

Github actions workflow failing to find Index.html for an ASP .NET Core MVC web app - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1189923/github-actions-workflow-failing-to-find-index-html Although I've been studying computer science for a few years now and am pretty comfortable talking about it, this is a new area for me and I'm not very familiar with all the proper terminology, so I apologize in advance. I'm trying to publish an azure static web app to act as a personal portfolio. I have the full ASP .NET Core MVC project built and I have added the github action workflow file but believe I have configured it incorrectly. It successfully builds in Oryx but gets stuck shortly after with this error: Here is my workflow file env variables: I'm wondering if what I'm trying to do is even possible, or if I'm barking up the wrong tree by trying to publish this kind of project without building it with something like Blazor. Any thoughts or recommendations?
Published Date : 28 марта 2023 г.

In IOS, While Launching the app from another app(Deep linking) for few seconds the last activity screen appeared - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193423/in-ios-while-launching-the-app-from-another-app(de I have created 2 applications using .NET MAUI, in first app, there are two pages which are LoginPage and HomePage. first it will open LoginPage and then after providing user credentials it will redirect to Homepage. there I have did some token based login implementation. after logout I came to LoginPage and kept this app in the background state and open the second app and through second app I'm Launching the first app, there I'm providing user details and token and did some code for auto login but while Launching the app LoginPage (last activity screen) is displayed for few seconds and then landed on HomePage so I have added one more page to verify and did the same thing and this time also the new page was appeared for few seconds I want to open the Homepage without showing last activity screen.
Published Date : 28 марта 2023 г.

the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container in VS2022 - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1192892/the-service-microsoft-visualstudio-shell-interop-i I recently installed Visual Studio 2022 Professional edition on my machine windows 2010. I'm just trying to create a sample windows form project and trying to open the designer / form by double clicking on Form1.cs and I'm getting this weird error message: "the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container" I have even tried uninstalling and reinstalling VS 2022 number of times but no use. It would be really great if someone can help me out in fixing this.
Published Date : 28 марта 2023 г.

The "StaticWebAssetsGeneratePackManifest" task failed unexpectedly Asp.Net Web Application MVC - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193441/the-staticwebassetsgeneratepackmanifest-task-faile Please first try to create a new ASP .NET Core web application(MVC) again and check if the same error appears this time. ... Besides, from the error message looks like the error may be caused by different versions of .NET/targeted framework.
Published Date : 28 марта 2023 г.

Учебник. Создание веб-API с помощью ASP.NET Core

https://learn.microsoft.com/ru-ru/aspnet/core/tutorials/first-web-api Узнайте, как создать веб-API с помощью ASP.NET Core.
Published Date : 28 марта 2023 г.

The type or namespace name 'Platform' does not exist in the namespace 'Microsoft.Maui.Graphics' (are you missing an assembly reference?) - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1190509/the-type-or-namespace-name-platform-does-not-exist I am using Visual Studio Community 2022 64 bit 4.8.04161 on Windows 11 Pro. I need to be able to draw an image at a particular location. I am attempting to use the documentation at https://learn.microsoft.com/en-us/dotnet/maui/user-interface/graphics/images?view=net-maui-7.0 or https://learn.microsoft.com/en-us/dotnet/maui/user-interface/graphics/images?view=net-maui-6.0 for displaying an IImage I have created a default .net maui project using visual studio using both 7.0 and 6.0 and then tacked the example code into MainPage::OnCounterClicked. This isn't what I want, of course, but I'm just trying to figure out how to get a clean build. I have seen the note that PlatformImage is not supported on windows, but not matter what platform I build for, Andriod, iOS, or Windows, I get the error in the title. Here are the complete errors as reported by the build: Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'Platform' does not exist in the namespace 'Microsoft.Maui.Graphics' (are you missing an assembly reference?) GraphicsTest6 (net6.0-windows10.0.19041.0) C:\CleverEggSoftware\trunk\projects\GraphicsTest6\GraphicsTest6\MainPage.xaml.cs 1 Active Severity Code Description Project File Line Suppression State Error CS0103 The name 'PlatformImage' does not exist in the current context GraphicsTest6 (net6.0-windows10.0.19041.0) C:\CleverEggSoftware\trunk\projects\GraphicsTest6\GraphicsTest6\MainPage.xaml.cs 31 Active Here is the hacked class What am I missing or doing wrong?
Published Date : 28 марта 2023 г.

SSIS Package is not loading in VS2019 - The Argument type "System.__ComObject' cannot be converted into parameter type "Microsoft.SqlServer.Dts.Pipleline.Wrapper.IDTSPipeline100' - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193444/ssis-package-is-not-loading-in-vs2019-the-argument Hi All, We are trying to migrate SSIS 2014 packages to SSIS 2019. We are using Package Deployment Model only. Under one solution we have multiple Projects and under one projects we have 4-5 packages. I selected one project, and in properties I changed to Target server version from 2014 to 2019. It converted all 5 packages under that project successfully. 4 out of 5 packages are opening without any issue. But I am not able to open 1 package, firstly it takes lot of time to open the package and then it fails to open it with the following error message - This package has script tasks, which is using some dlls also. Can anybody suggest what is the issue. Our aim is to just lift and shift the packages from 2014 to 2019 without breaking the functionality. We are not aiming to use any of the new features.
Published Date : 28 марта 2023 г.

MSAL.net with Vb.net Desktop application - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193434/msal-net-with-vb-net-desktop-application We need to use MSAL.Net in the VB.Net desktop project(.net framework 4.5), we didn't get any link over it.
Published Date : 28 марта 2023 г.

How to upgrade Xamarin native Mac application project to Mac .NET macOS application project - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193690/how-to-upgrade-xamarin-native-mac-application-proj I find out 3 template in VS2022 for Mac, The first one is Mac .NET macOS Application, the second one is Mac .Net Mac Catalyst Application and the third one is Multiplatform .NET MAUI project. In order to upgrade and migrate my Mac Xamarin native project to Microsoft new .NET architecture. I have created a new project with .NET macOS Application, It's neither a .Net Mac Catalyst Application or a Multiplatform .NET MAUI Application. I wonder if it's right to choose Mac .NET macOS Application project to upgrade my Xamarin Mac native application? And How to upgrade to Mac .NET macOS Application project. I think there are minimal changes than other two projects. Do you give me some more supports or solution in migrating to Mac .NET macOS Application? I don't have a stable experience in .NET macOS Application project with VS2022 for Mac, and I find some documents, some is .NET MAUI project, some is .Net Mac Catalyst Application, exactly I wonder the description about .NET macOS Application. In .NET macOS Application project, I can't find Build-> Mac->Bundle Signing in Project Properties window. I want to get a feasible solution as soon as possible. Thanks a lot!
Published Date : 28 марта 2023 г.

In C# XAML WPF app, getting Exception HResult -2146233079 Task - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1191153/in-c-xaml-wpf-app-getting-exception-hresult-214623 I have a Visual Studio C# WPF XAML application running on Windows 10 .Net 7.0. I have an async Task that runs continuously (while (IsRuuning). The job of the Task is to: every 100 ms, under a mutex, read the contents of a file located at statusfilePath, and use the contents of that file to update the contents of 5 Labels in the main window, When the statement "Xpos.Contents = terms[0];" is executed, the Exception is triggered. The Exception indicates "The calling thread cannot access this object because a different thread owns it." How can I run a continuously running task that periodically modifies the Contents of WPF Label objects owned by the MainWindow thread? Code for the Task:
Published Date : 28 марта 2023 г.

ADF Copy data activity issue from SQL Managed Instance to ADLS (Operation on target Source to ADLS failed: Failure happened on 'Source' side. ErrorCode=UserErrorFailedFileOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException) - Microsoft Q&A

https://learn.microsoft.com/en-us/answers/questions/1193347/adf-copy-data-activity-issue-from-sql-managed-inst Hello, I am encountering issue with the Copy activity in ADF with error message as below: Operation on target Source to ADLS failed: Failure happened on 'Source' side. ErrorCode=UserErrorFailedFileOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The file operation is failed, upload file failed at path: '[adls folder path]/data_31ccf4f0-8158-4109-908a-9ef4d936cc7d_59742144-0846-4d35-bc76-79558ed27ad6_00000.parquet'.,Source=Microsoft.DataTransfer.Common,''Type=System.Data.SqlClient.SqlException,Message=Transaction (Process ID 117) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.,Source=.Net SqlClient Data Provider,SqlErrorNumber=1205,Class=13,ErrorCode=-2146232060,State=52,Errors=[{Class=13,Number=1205,State=52,Message=Transaction (Process ID 117) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.,},],' Sometimes the run is successful but sometimes it will run into the error as mentioned above. Can someone kindly help advise on it? Thank you.
Published Date : 28 марта 2023 г.

MsalError.InvalidClient Field (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.msalerror.invalidclient Azure AD service error indicating a configuration issue. MitigationSee error message for details, then take corrective action in the app registration portal See https://aka.ms/msal-net-invalid-client for details.
Published Date : 28 марта 2023 г.

TLS issues - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/entra/msal/dotnet/advanced/exceptions/tls-issues How to diagnose and address TLS issues when using MSAL.NET
Published Date : 28 марта 2023 г.

ICertificateLoader Interface (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.icertificateloader Interface to implement loading of a certificate. Only use when loading a certificate from a daemon application, or an ASP NET app, using MSAL .NET directly. For an ASP NET Core app, Microsoft Identity Web will handle the certificate loading for you. IConfidentialClientApplication app; ICertificateLoader certificateLoader = new DefaultCertificateLoader(); certificateLoader.LoadIfNeeded(config.CertificateDescription); app = ConfidentialClientApplicationBuilder.Create(config.ClientId) .WithCertificate(config.CertificateDescription.Certificate) .WithAuthority(new Uri(config.Authority)) .Build();
Published Date : 28 марта 2023 г.

Microsoft Authentication Library for .NET - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/entra/msal/dotnet/ Learn how you can use the Microsoft Authentication Library for .NET (MSAL.NET) to acquire tokens from the Microsoft identity platform and access protected web APIs.
Published Date : 28 марта 2023 г.

DefaultCertificateLoader Class (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.defaultcertificateloader Certificate Loader. Only use when loading a certificate from a daemon application, or an ASP NET app, using MSAL .NET directly. For an ASP NET Core app, Microsoft Identity Web will handle the certificate loading for you. IConfidentialClientApplication app; ICertificateLoader certificateLoader = new DefaultCertificateLoader(); certificateLoader.LoadIfNeeded(config.CertificateDescription); app = ConfidentialClientApplicationBuilder.Create(config.ClientId) .WithCertificate(config.CertificateDescription.Certificate) .WithAuthority(new Uri(config.Authority)) .Build();
Published Date : 28 марта 2023 г.

IPublicClientApplication.AcquireTokenByUsernamePassword Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.ipublicclientapplication.acquiretokenbyusernamepassword Non-interactive request to acquire a security token from the authority, via Username/Password Authentication. Available only on .NET desktop and .NET core. See https://aka.ms/msal-net-up for details.
Published Date : 28 марта 2023 г.

PublicClientApplicationBuilder.WithDefaultRedirectUri Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplicationbuilder.withdefaultredirecturi Configures the public client application to use the recommended reply URI for the platform. See https://aka.ms/msal-net-default-reply-uri. Platform.NET desktopUWPFor system browser on .NET Core NOTE:There will be an update to the default redirect URI in the future to accommodate for system browsers on the .NET desktop and .NET Core platforms.
Published Date : 28 марта 2023 г.

Using WebView2 with MSAL.NET - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/entra/msal/dotnet/advanced/webview2 How to use the modern embedded browser based on Microsoft Edge with MSAL.NET applications.
Published Date : 28 марта 2023 г.

OpenIdConnectProtocolValidator.HashAlgorithmMap Property (Microsoft.IdentityModel.Protocols.OpenIdConnect) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.protocols.openidconnect.openidconnectprotocolvalidator.hashalgorithmmap Gets the algorithm mapping between OpenIdConnect and .Net for Hash algorithms. a IDictionary<TKey,TValue> that contains mappings from the JWT namespace https://datatracker.ietf.org/doc/html/rfc7518 to .Net.
Published Date : 28 марта 2023 г.

TokenCacheExtensions Class (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.tokencacheextensions Extension methods to expose a simplified developer experience for adding token caches to MSAL.NET confidential client applications in ASP.NET, or .NET Core, or .NET FW.
Published Date : 28 марта 2023 г.

MsalError.CryptoNet45 Field (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.msalerror.cryptonet45 What happens?MSAL cannot use the certificate for signing. MitigationPossible cause: use of CNG certificates with .Net classic 4.6 or lower. Either target a higher version of .NET desktop - 4.6.1 and above, or use a different certificate type (non-CNG) or sign your own assertion as described at https://aka.ms/msal-net-signed-assertion
Published Date : 28 марта 2023 г.

PublicClientApplication.AcquireTokenByUsernamePasswordAsync Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplication.acquiretokenbyusernamepasswordasync Non-interactive request to acquire a security token from the authority, via Username/Password Authentication. Available only on .net desktop and .net core. See https://aka.ms/msal-net-up for details.
Published Date : 28 марта 2023 г.

PublicClientApplication.IsBrokerAvailable Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplication.isbrokeravailable Returns true if a broker can be used. This method is only needed to be used in mobile scenarios which support Mobile Application Management. In other supported scenarios, use WithBroker by itself, which will fall back to use a browser if broker is unavailable.
Published Date : 28 марта 2023 г.

Default reply URI - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/entra/msal/dotnet/how-to/default-reply-uri How to customize the reply URI in applications using MSAL.NET.
Published Date : 28 марта 2023 г.

PublicClientApplicationBuilder.IsBrokerAvailable Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplicationbuilder.isbrokeravailable Returns true if a broker can be used. This method is only needed to be used in mobile scenarios which support Mobile Application Management. In other supported scenarios, use WithBroker by itself, which will fall back to use a browser if broker is unavailable.
Published Date : 28 марта 2023 г.

ConfidentialClientApplication.AppTokenCache Property (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.confidentialclientapplication.apptokencache Application token cache. This case holds access tokens for the application. It's maintained and updated silently if needed when calling AcquireTokenForClient(IEnumerable<String>)
Published Date : 28 марта 2023 г.

IClientApplicationBase.UserTokenCache Property (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.iclientapplicationbase.usertokencache User token cache. This case holds id tokens, access tokens and refresh tokens for accounts. It's used and updated silently if needed when calling AcquireTokenSilent(IEnumerable<String>, IAccount) It is updated by each AcquireTokenXXX method, with the exception of AcquireTokenForClient which only uses the application cache (see IConfidentialClientApplication).
Published Date : 28 марта 2023 г.

IConfidentialClientApplication.AppTokenCache Property (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.iconfidentialclientapplication.apptokencache Application token cache. This case holds access tokens for the application. It's maintained and updated silently if needed when calling AcquireTokenForClient(IEnumerable<String>)
Published Date : 28 марта 2023 г.

Client credential flows in MSAL.NET - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/entra/msal/dotnet/acquiring-tokens/web-apps-apis/client-credential-flows MSAL is a multi-framework library. Confidential Client flows are not available on mobile platforms (UWP, Xamarin.iOS, and Xamarin.Android) since there is no secure way of deploying a secret there.
Published Date : 28 марта 2023 г.

IMsalHttpClientFactory Interface (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.imsalhttpclientfactory Factory responsible for creating HttpClient .Net recommends to use a single instance of HttpClient.
Published Date : 28 марта 2023 г.

JwtSecurityTokenHandler.JsonClaimTypeProperty Property (System.IdentityModel.Tokens.Jwt) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtsecuritytokenhandler.jsonclaimtypeproperty Gets or sets the property name of Properties the will contain .Net type that was recognized when Claims serialized the value to JSON. See for more information.
Published Date : 28 марта 2023 г.

WamExtension.WithWindowsBroker Method (Microsoft.Identity.Client.Desktop) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.desktop.wamextension.withwindowsbroker Enables Windows broker flows on older platforms, such as .NET framework, where these are not available in the box with Microsoft.Identity.Client For details about Windows broker, see https://aka.ms/msal-net-wam
Published Date : 28 марта 2023 г.

ClientApplicationBase.UserTokenCache Property (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.clientapplicationbase.usertokencache User token cache. It holds access tokens, id tokens and refresh tokens for accounts. It's used and updated silently if needed when calling AcquireTokenSilent(IEnumerable<String>, IAccount) or one of the overrides of AcquireTokenSilent(IEnumerable<String>, IAccount). It is updated by each AcquireTokenXXX method, with the exception of AcquireTokenForClient which only uses the application cache (see IConfidentialClientApplication).
Published Date : 28 марта 2023 г.

IClientApplicationBase.RedirectUri Property (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.iclientapplicationbase.redirecturi The redirect URI (also known as Reply URI or Reply URL), is the URI at which Azure AD will contact back the application with the tokens. This redirect URI needs to be registered in the app registration (https://aka.ms/msal-net-register-app) In MSAL.NET, PublicClientApplication define the following default RedirectUri values: urn:ietf:wg:oauth:2.0:oob for desktop (.NET Framework and .NET Core) applicationsmsal{ClientId} for Xamarin iOS and Xamarin Android (as this will be used by the system web browser by default on these platforms to call back the application) These default URIs could change in the future. In ConfidentialClientApplication, this can be the URL of the web application / web API.
Published Date : 28 марта 2023 г.

ClientApplicationBase.RedirectUri Property (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.clientapplicationbase.redirecturi The redirect URI (also known as Reply URI or Reply URL), is the URI at which Azure AD will contact back the application with the tokens. This redirect URI needs to be registered in the app registration (https://aka.ms/msal-net-register-app). In MSAL.NET, PublicClientApplication define the following default RedirectUri values: https://login.microsoftonline.com/common/oauth2/nativeclient for desktop (.NET Framework and .NET Core) applicationsmsal{ClientId} for Xamarin iOS and Xamarin Android (as this will be used by the system web browser by default on these platforms to call back the application) These default URIs could change in the future. In Microsoft.Identity.Client.ConfidentialClientApplication, this can be the URL of the web application / web API.
Published Date : 28 марта 2023 г.

PublicClientApplicationBuilder.WithBroker(Boolean) Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplicationbuilder.withbroker Brokers enable Single-Sign-On, device identification, and application identification verification. To enable one of these features, you need to set the WithBroker() parameters to true. See https://aka.ms/msal-net-brokers for more information on platform specific settings required to enable the broker. On iOS and Android, Authenticator and Company Portal serve as brokers. On Windows, WAM (Windows Account Manager) serves as broker. See https://aka.ms/msal-net-wam
Published Date : 28 марта 2023 г.

MsalError.InvalidOwnerWindowType Field (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.msalerror.invalidownerwindowtype Invalid owner window type. What happens? You used "AcquireTokenInteractiveParameterBuilder.WithParentActivityOrWindow(object) but the parameter you passed is invalid. Remediation On .NET Standard, the expected object is an Activity on Android, a UIViewController on iOS, a NSWindow on MAC, and a IWin32Window or IntPr on Windows. If you are in a WPF application, you can use WindowInteropHelper(wpfControl).Handle to get the window handle associated with a WPF control
Published Date : 28 марта 2023 г.

MsalDistributedTokenCacheAdapterOptions Class (Microsoft.Identity.Web.TokenCacheProviders.Distributed) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.tokencacheproviders.distributed.msaldistributedtokencacheadapteroptions Options for the MSAL token cache serialization adapter, which delegates the serialization to the IDistributedCache implementations available with .NET Core.
Published Date : 28 марта 2023 г.

PublicClientApplicationBuilder.WithParentActivityOrWindow Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplicationbuilder.withparentactivityorwindow Sets a reference to the IntPtr to a window that triggers the browser to be shown. Used to center the browser that pop-up onto this window.
Published Date : 28 марта 2023 г.

AcquireTokenInteractiveParameterBuilder.WithParentActivityOrWindow Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.acquiretokeninteractiveparameterbuilder.withparentactivityorwindow Sets a reference to the IntPtr to a window that triggers the browser to be shown. Used to center the browser that pop-up onto this window. The center of the screen or the foreground app if a value is configured.
Published Date : 28 марта 2023 г.

ITokenAcquisition.GetAccessTokenForUserAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.itokenacquisition.getaccesstokenforuserasync Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the User member of the controller's HttpContext parameter.
Published Date : 28 марта 2023 г.

UIParent Class (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.uiparent Learn more about the Microsoft.Identity.Client.UIParent in the Microsoft.Identity.Client namespace.
Published Date : 28 марта 2023 г.

PublicClientApplicationBuilder Class (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplicationbuilder Learn more about the Microsoft.Identity.Client.PublicClientApplicationBuilder in the Microsoft.Identity.Client namespace.
Published Date : 28 марта 2023 г.

ITokenAcquisition.GetAccessTokenForAppAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.itokenacquisition.getaccesstokenforappasync Acquires a token from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.
Published Date : 28 марта 2023 г.

ITokenAcquirer.GetTokenForAppAsync Method (Microsoft.Identity.Abstractions) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.abstractions.itokenacquirer.gettokenforappasync Acquires an authentication result from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.
Published Date : 28 марта 2023 г.

ITokenAcquirer.GetTokenForUserAsync Method (Microsoft.Identity.Abstractions) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.abstractions.itokenacquirer.gettokenforuserasync Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the current user.
Published Date : 28 марта 2023 г.

OpenIdConnectProtocolValidator Class (Microsoft.IdentityModel.Protocols.OpenIdConnect) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.protocols.openidconnect.openidconnectprotocolvalidator OpenIdConnectProtocolValidator is used to ensure that an OpenIdConnectMessage obtained using OpenIdConnect is compliant with http://openid.net/specs/openid-connect-core-1_0.html .
Published Date : 28 марта 2023 г.

ITokenAcquisition.GetAuthenticationResultForUserAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.itokenacquisition.getauthenticationresultforuserasync Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the current user
Published Date : 28 марта 2023 г.

ITokenAcquisition.GetAuthenticationResultForAppAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.itokenacquisition.getauthenticationresultforappasync Acquires an authentication result from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.
Published Date : 28 марта 2023 г.

IPublicClientApplication Interface (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.ipublicclientapplication Interface to be used with desktop or mobile applications (Desktop / UWP / Xamarin.iOS / Xamarin.Android). public client applications are not trusted to safely keep application secrets, and therefore they only access web APIs in the name of the user only. For details see https://aka.ms/msal-net-client-applications.
Published Date : 28 марта 2023 г.

AppServicesAuthenticationTokenAcquisition.GetAccessTokenForAppAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.appservicesauthenticationtokenacquisition.getaccesstokenforappasync Acquires a token from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.
Published Date : 28 марта 2023 г.

AppServicesAuthenticationTokenAcquisition.GetAccessTokenForUserAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.appservicesauthenticationtokenacquisition.getaccesstokenforuserasync Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the current user
Published Date : 28 марта 2023 г.

AppServicesAuthenticationTokenAcquisition.GetAuthenticationResultForUserAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.appservicesauthenticationtokenacquisition.getauthenticationresultforuserasync Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the current user
Published Date : 28 марта 2023 г.

AppServicesAuthenticationTokenAcquisition.GetAuthenticationResultForAppAsync Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.appservicesauthenticationtokenacquisition.getauthenticationresultforappasync Acquires an authentication result from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.
Published Date : 28 марта 2023 г.

IClientApplicationBase Interface (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.iclientapplicationbase Abstract class containing common API methods and properties. Both PublicClientApplication and ConfidentialClientApplication extend this class. For details see https://aka.ms/msal-net-client-applications.
Published Date : 28 марта 2023 г.

ClientApplicationBase Class (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.clientapplicationbase Abstract class containing common API methods and properties. Both PublicClientApplication and ConfidentialClientApplication extend this class. For details see https://aka.ms/msal-net-client-applications
Published Date : 28 марта 2023 г.

PublicClientApplication.AcquireTokenByUsernamePassword Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplication.acquiretokenbyusernamepassword Non-interactive request to acquire a security token from the authority, via Username/Password Authentication. See https://aka.ms/msal-net-up for details.
Published Date : 28 марта 2023 г.

PublicClientApplication Class (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplication Abstract class containing common API methods and properties. For details see https://aka.ms/msal-net-client-applications
Published Date : 28 марта 2023 г.

DownstreamWebApiOptions Class (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.downstreamwebapioptions Options passed-in to call downstream web APIs. To call Microsoft Graph, see rather MicrosoftGraphOptions in the Microsoft.Identity.Web.MicrosoftGraph assembly.
Published Date : 28 марта 2023 г.

PublicClientApplication.AcquireTokenByIntegratedWindowsAuthAsync Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.publicclientapplication.acquiretokenbyintegratedwindowsauthasync Non-interactive request to acquire a security token for the signed-in user in Windows, via Integrated Windows Authentication. See https://aka.ms/msal-net-iwa. The account used in this overrides is pulled from the operating system as the current user principal name
Published Date : 28 марта 2023 г.

JwtSecurityTokenHandler Class (System.IdentityModel.Tokens.Jwt) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtsecuritytokenhandler A SecurityTokenHandler designed for creating and validating Json Web Tokens. See: https://datatracker.ietf.org/doc/html/rfc7519 and http://www.rfc-editor.org/info/rfc7515
Published Date : 28 марта 2023 г.

ConfidentialClientApplication Class (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.confidentialclientapplication Class to be used for confidential client applications (web apps, web APIs, and daemon applications).
Published Date : 28 марта 2023 г.

TokenValidationParameters Class (Microsoft.IdentityModel.Tokens) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.tokens.tokenvalidationparameters Contains a set of parameters that are used by a SecurityTokenHandler when validating a SecurityToken.
Published Date : 28 марта 2023 г.

ConfidentialClientApplication.AcquireTokenForClient Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.confidentialclientapplication.acquiretokenforclient Acquires a token from the authority configured in the app, for the confidential client itself (in the name of no user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.
Published Date : 28 марта 2023 г.

JwtPayload Class (System.IdentityModel.Tokens.Jwt) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtpayload Initializes a new instance of JwtPayload which contains JSON objects representing the claims contained in the JWT. Each claim is a JSON object of the form { Name, Value }.
Published Date : 28 марта 2023 г.

ClientApplicationBase.AcquireTokenSilent Method (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.clientapplicationbase.acquiretokensilent [V3 API] Attempts to acquire an access token for the account from the user token cache. See https://aka.ms/msal-net-acquiretokensilent for more details
Published Date : 28 марта 2023 г.

IAccount Interface (Microsoft.Identity.Client) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.iaccount The IAccount interface represents information about a single account. The same user can be present in different tenants, that is, a user can have multiple accounts. An IAccount is returned in the AuthenticationResult.Account property, and can be used as parameters of PublicClientApplication and ConfidentialClientApplication methods acquiring tokens such as AcquireTokenSilent(IEnumerable<String>, IAccount)
Published Date : 28 марта 2023 г.

JsonWebKey Class (Microsoft.IdentityModel.Tokens) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.tokens.jsonwebkey Represents a JSON Web Key as defined in https://datatracker.ietf.org/doc/html/rfc7517.
Published Date : 28 марта 2023 г.

MicrosoftIdentityWebApiServiceCollectionExtensions.AddMicrosoftIdentityWebApiAuthentication Method (Microsoft.Identity.Web) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.microsoftidentitywebapiservicecollectionextensions.addmicrosoftidentitywebapiauthentication Protects the web API with Microsoft identity platform (formerly Azure AD v2.0) This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.
Published Date : 28 марта 2023 г.

JwtRegisteredClaimNames Struct (System.IdentityModel.Tokens.Jwt) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtregisteredclaimnames List of registered claims from different sources https://datatracker.ietf.org/doc/html/rfc7519#section-4 http://openid.net/specs/openid-connect-core-1_0.html#IDToken
Published Date : 28 марта 2023 г.

JwtHeader Class (System.IdentityModel.Tokens.Jwt) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtheader Initializes a new instance of JwtHeader which contains JSON objects representing the cryptographic operations applied to the JWT and optionally any additional properties of the JWT. The member names within the JWT Header are referred to as Header Parameter Names. These names MUST be unique and the values must be String(s). The corresponding values are referred to as Header Parameter Values.
Published Date : 28 марта 2023 г.

Overriding authority - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/entra/msal/dotnet/how-to/overriding-authority How to override the default authority in MSAL.NET applications.
Published Date : 28 марта 2023 г.

RequiredScopeAttribute Class (Microsoft.Identity.Web.Resource) - Microsoft Authentication Library for .NET

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.resource.requiredscopeattribute This attribute is used on a controller, pages, or controller actions to declare (and validate) the scopes required by a web API. These scopes can be declared in two ways: hardcoding them, or declaring them in the configuration. Depending on your choice, use either one or the other of the constructors. For details, see https://aka.ms/ms-id-web/required-scope-attribute.
Published Date : 28 марта 2023 г.