Authentication with Microsoft Dataverse web services

Note

Effective November 2020:

  • Common Data Service has been renamed to Microsoft Dataverse. Learn more
  • Some terminology in Microsoft Dataverse has been updated. For example, entity is now table and field is now column. Learn more

This article will be updated soon to reflect the latest terminology.

When you create client applications that use Dataverse web services you need to authenticate to gain access to data. How you authenticate depends on the software framework you use and which web service you want to connect with.

.NET Framework Applications

If your client application uses the .NET Framework, you have two options:

  • OAuth
  • Microsoft 365

OAuth

OAuth is the preferred means to authenticate because it provides access to both the OData RESTful web services (Web API and OData Global Discovery Service) as well as to the SOAP web services (Organization Service and Discovery Service).

OAuth is also required to support:

  • Azure Active Directory configurations for conditional access, such as Two Factor Authentication (2FA)
  • Use of client secrets to enable server-to-server authentication scenarios.
  • Cross-Origin Resource Sharing (CORS) to connect a Single Page Application (SPA)

More information: Use OAuth with Dataverse

Microsoft 365

Microsoft 365 authentication requires using the .NET Framework SDK assemblies with the SOAP web services only.

Using Microsoft 365 authentication does not require that your register your applications as OAuth does. You must simply provide a User Principal Name (UPN) and password for a valid user.

More information: Authentication with .NET Framework applications, Use of Microsoft 365 authentication with the WS-Trust security protocol

All other software frameworks

If you are using anything other than .NET Framework, you must authenticate using OAuth and you must use the OData RESTful web services (Web API and OData Global Discovery Service).

More information: Use OAuth with Dataverse

Note

Can you tell us about your documentation language preferences? Take a short survey.

The survey will take about seven minutes. No personal data is collected (privacy statement).