question

DevJunior20-9506 avatar image
0 Votes"
DevJunior20-9506 asked ·

Azure Logic Apps facebook custom connector is not authenticate

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
errorlogin.gif (756.3 KiB)
capture.jpg (27.2 KiB)
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @DevJunior20-9506

Following up to check if the below answer has helped you.

0 Votes 0 · ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered ·

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.




image.png (73.0 KiB)
image.png (35.9 KiB)
· 4 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @DevJunior20-9506

The below error is originated from the Facebook Graph API end.

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.

I have already reached out to Facebook on this thread: https://developers.facebook.com/community/threads/2720883664863705/?post_id=2720883668197038 and waiting for their response, how we can allow the OAuth Redirect URL or the domain name that needs to be added at Facebook developer port to make this work.

You can follow with them on the above thread and if there are any further updates by them, I will be updating it in this thread.



0 Votes 0 · ·

Hi @mayankbargali-msft


Thank you for replay I am sorry to late response according the documentation I have put the (Valid OAuth Redirect URIs ) in facebook app settings - Client OAuth Settings section also I have attached that,which URl or domain must be putting in the ( App Domains
) fort logic apps ? please see the attachments




11983-pict2.png



11933-pic1.png




Thank you for your support



0 Votes 0 · ·
pict2.png (27.0 KiB)
pic1.png (63.8 KiB)

Hi @DevJunior20-9506


I have updated the answer. Hope that helps and let me know if you need assistance.


Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.




0 Votes 0 · ·

Thank you for your effort now I can connected and authenticate the custom Facebook connector with Facebook App successfully,my goal is that to post on a Facebook page automatically by azure logic apps unfortunately 'publish_pages' is deprecated.

0 Votes 0 · ·