Authenticate to Microsoft Dataverse with the Web API
You must use OAuth as described in Use OAuth with Dataverse.
The code you write to manage authentication when using the Web API depends on the type of deployment and where your code is.
Authenticate with JavaScript in web resources
When you use the Web API with JavaScript within HTML web resources, form scripts, or ribbon commands you don't need to include any code for authentication. In each of these cases the user is already authenticated by the application and authentication is managed by the application.
If you're creating a single page application (SPA) using JavaScript you can use the msal.js library as described in Use OAuth with Cross-Origin Resource Sharing to connect a Single Page Application.
See also
Use the Dataverse Web API
Web API types and operations
Perform operations using the Web API
Use OAuth with Dataverse
Use OAuth with Cross-Origin Resource Sharing to connect a Single Page Application
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應