Building Daemon or Service Apps with Office 365 that doesn't require sign in

317 views Asked by At

Got the Sample Project up&running, URL: https://github.com/mattleib/o365api-as-apponly-webapp

Problem is, sample still needs user manually retrieve authorization, which is still not fully automatic process to get token, i.e., a sign in page shows up requiring username/password input with following error message,

PS, as the error message suggests, is this because I'm not supplying the right admin name? I went through the web config and the article but it doesn't seem there's anything I missed?

This doesn't look like a valid user ID Your user ID should look like an email address, for example [email protected] or [email protected].

1

There are 1 answers

4
Jason Johnston On BEST ANSWER

An administrator does have to sign in once to provide consent, which gets recorded in their AAD. Once that happens, apps using this flow can get tokens silently, without user logon. However, the sample always asks you to logon when you restart it, as it doesn't implement any storage to record which organizations have consented already.

So in a real app, you would have the admin login one time as part of a "sign up" process, then you would be good for that organization.