- Created minimal API in Visual Studio 2022 with auth backed by Azure AD
- This registers API app with Azure AD and writes to app settings file: Azure client id, AD domain, Tenant ID, scope
- Created API request in Postman with https://localhost:1234/endpoint URL
- Getting 401 Unauthorized
- Add Auth2.0 configuration
- Requires registering Client App in Azure AD
Gotchas
Client ID has to be registered in Azure AD App registrations and added to the list of clients for API
Client Secret has to be created in Azure AD
The scope entered as data.read
in Azure has to be entered with fully qualified
form in Postman Scope:
https://GuznerConsulting.onMicrosoft.com/WebApi/data.read