singer-io / tap-bing-ads

A Singer.io tap for extracting data from the Bing Ads API
GNU Affero General Public License v3.0
12 stars 28 forks source link

Prefer Microsoft Identity Platform Authentication #99

Closed dmosorast closed 2 years ago

dmosorast commented 2 years ago

Description of change

This PR is to bring the tap up to modern methods of authentication. Currently, the code prefers the old method unless told via a config option which will fail after March 1st.

This PR does a couple of things:

  1. Removes the config option in preference of feature detection with the refresh token
  2. Tries the modern method (Microsoft Identity Platform, which is the default for the client library and uses the "offline_access https://ads.microsoft.com/msads.manage" scopes) then catches the exception thrown if the connection hasn't been re-authed with the newest scope and falls back to the original scope.

Manual QA steps

Risks

Rollback steps