Azure Logic Apps facebook custom connector is not authenticate

DevJunior20 41 Reputation points
2020-07-09T11:26:29.513+00:00

I have followed this open source code to creating custom Facebook connector on azure logic app, the custom Facebook connector has been created successfully now I have one problem when I want to authenticate with facebook I got this error message I have no idea about that for more details I have attached GIF image11636-errorlogin.gif

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

11691-capture.jpg

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,845 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 68,476 Reputation points
    2020-07-09T14:59:12.09+00:00

    Hi @DevJunior20-9506

    I am able to repro the same behavior at my end. Looking into the document https://github.com/microsoft/PowerPlatformConnectors/blob/master/custom-connectors/Facebook/README.md it is mentioned

    On Facebook developer dashboard update 'Valid OAuth Redirect URIs' under Products >> Facebook Login >> Settings. You can find the redirect URI on the security page of your custom connector.

    Logging into https://developers.facebook.com/ I don't see the option "Valid OAuth Redirect URIs" under the setting of app. I am reaching out to my team to confirm what would the option that needs to enable or app domain name that needs to add to make this work.

    Update:

    Hi @DevJunior20-9506

    You can find the Valid OAuth Redirect URIs under the customer connector security option and You add the domain azure-apim.net under the "App Domain" in the Facebook developer portal. If you found that there is an issue with the custom connector (scope etc) you can always create the issue here: https://github.com/microsoft/PowerPlatformConnectors/issues

    12416-image.png

    I further found the issue with the apiDefinition.swagger.json file as 'publish_pages' is deprecated from the Facebook end: https://developers.facebook.com/docs/facebook-login/permissions

    12417-image.png

    You need to update the apiDefinition.swagger.json as below removing the 'publish_pages' from swagger json file and upload it again.

    "security": [
    {
    "oauth2_auth": [
    "user_posts"
    ]
    }
    ],
    "securityDefinitions": {
    "oauth2_auth": {
    "authorizationUrl": "https://graph.facebook.com/oauth/authorize";,
    "flow": "accessCode",
    "scopes": {
    "user_posts": "user_posts"
    },
    "tokenUrl": "https://login.windows.net/common/oauth2/authorize";,
    "type": "oauth2"
    }
    },
    "swagger": "2.0",
    "tags": []
    }

    I will file this bug and to remove it from the swagger json file: https://github.com/microsoft/PowerPlatformConnectors/blob/master/custom-connectors/Facebook/apiDefinition.swagger.json

    Hope this helps and let me know if you need any assistance.


0 additional answers

Sort by: Most helpful