This sample code snippet can be used to access Azure Sphere public API using AAD token acquired by AAD Device code flow. This code can be used to acquire token in Web application context.
File/folder | Description |
---|---|
DeviceCodeModel.cshtml |
The Razor PageModel |
DeviceCodeModel.cshtml.cs |
The PageModel backend. |
README.md |
This README file. |
LICENSE.txt |
The license for the project. |
Please refer the following document.
- AAD Device Code Flow Documentation
- Azure Sphere Public API - Authentication values
- Copy the razor pages directly in ASP .net application
- Otherwise, use the frontend & backend in the existing application at the corresponding place.
This code is an illustrative snippet only, it has not been reviewed for production-readiness.
This code is not formally maintained, but we will make a best effort to respond to/address any issues you encounter.
If you run into an issue with this code, please open a GitHub issue against this repo.