active-directory-dotnet-daemon
                                
                                 active-directory-dotnet-daemon copied to clipboard
                                
                                    active-directory-dotnet-daemon copied to clipboard
                            
                            
                            
                        A Windows console application that calls a web API using its app identity (instead of a user's identity) to get access tokens in an unattended job or process.
Calling a Web API in a daemon app or long-running process
There's a newer version of this sample taking advantage of the Microsoft identity platform (formerly Azure AD v2.0)
Check it out: https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2
If you really need to access this Azure AD v1.0, you can navigate to the master branch, but please know that it's no longer supported.