I have an existing WCF Service Library (self-hosted). I'm attempting to move it into a Cloud Worker Role and have discovered that my old AD LDS isn't going to work (unless I secure it with SSL through LDAP, which seems buggy). I've got a working example of a simple client talking to a MVC controller, but I can't make the translation to a WCF Library. Does anyone know of a working example or walk through that can show me how this is done?
1 Answers
From the description, you want to integrate your on-premises directories with Azure Active Directory for the authenticate/authorization for the WCF.
In this scenario, we need to install the Azure AD Connect to federate your Azure AD with on-premise AD. When you client want to request the WCF, it need to get the access token through Azure AD. Here is a figure for your reference:
And you can find many documents about how to migrate the on-premise application to the cloud. Here is one for your reference:
Microsoft Azure - Tips for Migrating Your Applications to the Cloud
You may also be interest in Azure Relay which enable you to securely expose services that reside within a corporate enterprise network to the public cloud, without having to open a firewall connection, or require intrusive changes to a corporate network infrastructure.
Update
If you were using the Azure Active Directory, there is no need to query the AD in your application. Instead the Azure AD will issue an access token which you can used to call the WCF. And in WCF, you just need to verify the access token is validate. The scenario in the post is more complicate which integrate the Azure Active Directory with on-premise Active Directory.
Microsoft also provide lots of samples to help developers to get started to integrate with Azure Active Directory, you can refer these samples from here. And for verifying the access token manually in WCF, you also could refer here.

- 14,369
- 1
- 19
- 27
-
No. That's not at all the problem I described. I can't take my existing client-facing AD LDS into the cloud with my service, so I need to replace it with Azure Active Directory. The web service is an WCF Service Library, which means it doesn't have the plumbing of a MVC or Web API application. I can't seem to find a single reference on how Azure is accessed without the MVC plumbing. – Quark Soup Feb 13 '17 at 21:49
-
If you were using the Azure Active Directory, there is no need to query the AD in your application. Instead the Azure AD will issue an access token which you can used to call the WCF. And in WCF, you just need to verify the access token is validate. The scenario in the post is more complicate which integrate the Azure Active Directory with on-premise Active Directory. – Fei Xue Feb 20 '17 at 08:52
-
1Microsoft also provide lots of samples to help developers to get started to integrate with Azure Active Directory, you can refer these samples from [here](https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-code-samples). And for verifying the access token manually in WCF, you also could refer [here](https://github.com/dream-365/OfficeDev-Samples/blob/master/samples/Office365DevQuickStart/OAuth2-basic/JsonWebTokenValidator.cs). – Fei Xue Feb 20 '17 at 08:53
-
Xui - The second link you provided is the one that works. Thanks. – Quark Soup Feb 20 '17 at 14:01
-
Glad to hear it helps and please feel free to let me know if you still have problem developing with Azure Active Directory. – Fei Xue Feb 21 '17 at 05:30