通过provisioningapi.microsoftonline.com/ProvisioningWebService.svc服务从C#连接到Azure AD

时间:2016-06-01 14:46:05

标签: c# powershell azure

A可以使用ProvisioningWebService Service(https://provisioningapi.microsoftonline.com/ProvisioningWebService.svc)中的ProvisioningWebService.IProvisioningWebService。 我添加到我的项目wsdl。在web.config中生成:

<system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="External">
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="https://provisioningapi.microsoftonline.com/ProvisioningWebService.svc"
    binding="wsHttpBinding" bindingConfiguration="External" contract="ProvisioningWebService.IProvisioningWebService"
    name="External">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
</client>

获取客户:

var provisioningWebServiceService = new ProvisioningWebServiceClient("External");

如何将 UserIdentityHeader LiveToken BecContext 添加到客户端? 来自powershell的请求很好。请求来自c#bad。我有错误&#34;此错误的创建者未指定原因。&#34;

0 个答案:

没有答案