Azure Code Samples
Learn to interact with Azure services through code
62 code samples match your filter
An ASP.NET Core web application that authenticates Azure AD users and calls a web API using OAuth 2.0 access tokens.
This sample demonstrates how to leverage ADAL .NET to authenticate user calls to a web API (in this case, the directory Graph) from apps that do not have the capability of offering an interactive authentication experience.
A .NET 4.5 daemon application that uses a certificate to authenticate with Azure AD and get OAuth 2.0 access tokens.
An ASP.NET Core web application that signs-in Azure AD users from a single Azure AD tenant.
A sample .NET 4.5 MVC SaaS web app that signs-up and signs-in users from any Azure AD tenant, and calls the Azure AD Graph API.
A sample showcasing how to develop a web application that handles sign on via the unified Azure AD and MSA endpoint, so that users can sign in using both their work/school account or Microsoft account. The sample also shows how to use MSAL to obtain a token for invoking the Microsoft Graph.
Sample showing how a windows Desktop .NET (WPF) application can get an access token using MSAL.NET and call the Microsoft Graph API or other APIs protected by Azure Active Directory v2
This is a simple Xamarin Forms app showcasing how to use MSAL to authenticate MSA and Azure AD via the converged MSA and Azure AD authentication endpoints, and access the Microsoft Graph with the resulting token.
A Windows Universal Platform client application using msal.net, accessing the Microsoft Graph for a user authenticating with Azure AD V2 endpoint
This sample shows how to build a Xamarin binding to our native ADAL for Android library.
A .NET 4.5 MVC Web API protected by Azure AD that receives tokens from a client and uses ADAL to get tokens for calling a downstream web API with a Conditional Access policy applied to it.
A .NET 4.5 MVC Web API protected by Azure AD that receives tokens from a client and uses ADAL to get tokens for calling another downstream web API
A Xamarin application that signs users in with Azure Active Directory across several different platforms and calls the Azure AD Graph API using OAuth 2.0 access tokens.
A .NET core daemon application that uses a certificate to authenticate with Azure AD and get OAuth 2.0 access tokens to a .NET core web api
A server app that uses Azure AD and the ADAL4J library for authenticating the user and calling a web API using OAuth 2.0 access tokens.
A WPF application that calls a Web API running on ASP.NET Core protected by Azure AD using OAuth 2.0 access tokens.