twitter-oauthazure-ad-b2c-custom-policyazure-ad-b2c

Azure B2C social logon with Twitter - AuthorizationError


I am setting up Twitter as a social login option following this doc reference on auto-account-link policies. It's been quite some time since I've finished the policy side but keep consistently getting the authorization error below:

correlationId: 1bb357d5-ecdc-437f-97cb-9958ac5940f3

{
    "Key": "OAuth1RequestInfo",
    "Value": {
        "TechnicalProfileId": "Twitter-OAuth1-SignIn",
        "AccessTokenEndpoint": "https://api.twitter.com/oauth/access_token",
        "AuthorizationEndpoint": "https://api.twitter.com/oauth/authenticate",
        "CallbackUri": "https://<tenant-name>.b2clogin.com/<tenant-name>.onmicrosoft.com/b2c_1a_accountlink_susi/oauth1/authresp",
        "ClientId": "aDNZQ1dZTlJEZjFGUXBzb0ZfY1U6MTpjaQ"
    }
},
{
    "Key": "AuthorizationError",
    "Value": "The call to https://api.twitter.com/oauth/request_token for a request token of aDNZQ1dZTlJEZjFGUXBzb0ZfY1U6MTpjaQ returned an error Unauthorized"
}

Things I've tried:

image

Appreciate your input!


Solution

  • After an issue opened with MS docs they've got it updated, as follows:

    If you're facing unauthorized error while testing this identity provider, make sure you use the correct Twitter API Key and API Key Secret, or try to apply for elevated access. Also, we recommend you've a look at Twitter's projects structure, if you registered your app before the feature was available.