问题
Trying to setup a bunch of logic apps with supporting Azure functions etc. concept is to utilize ML/Azure functions/Logic apps etc. to setup an automated mailing system.
Everything is deployed using VSTS/Git with CD/CI pipelines, but we have a problem with the Office365 connector that needs authentication after creation. For now, we have followed this article that creates a windows form for authentication (https://blogs.technet.microsoft.com/ronba/2016/05/09/using-powershell-and-the-office-365-rest-api-with-oauth/).
This works fine but we want to do this at scale and thus are looking for a silent approach, any ideas or links would be appreciated?
Ps. Use does not require MFA
回答1:
Do you need different Logic Apps to use different Office 365 accounts?
At the moment, the Office365 API authorisation works with the OAuth 2.0 Authorisation Code Grant Type, which means, you can only get the authorisation code by getting the user owning the mailbox (or having access to the shared mailbox) to sign in to get the code. This behaviour of the API is by design. Thus, there is no way to fully automate this.
If you don't need different accounts for different Logic Apps, you can create those API connections with powershell (still requiring the user to login in) for each environment and then use the already provisioned API in our CD pipeline.
If you really need to automate that step, you could switch to SendGrid, which authentication is different and can be automated by providing the SendGrid Key.
HTH,
来源:https://stackoverflow.com/questions/50186466/authenticating-office365-logic-app-connector-with-ps