我正在阅读documentation并遇到一个问题,我不知道怎么让Dynamics resource
使用任何API获取access_token
(我知道我的CRM根服务地址,但我不想在我的代码库中硬编码这个服务名称)。能否请您解决这个问题?
您无需在代码库中对其进行硬编码,如文档示例中所示。但通常我们会将它保存在web.config
或app.config
xml文件中,就像任何连接字符串和consume it一样。
Use connection strings in XRM tooling to connect to Common Data Service for Apps
您可以使用Online Management API获取Office 365租户中所有Dynamics 365实例的列表。我相信当您选中“显示组织列表”时,这就是插件注册工具的功能。
这看起来很有用:
C#示例演示了如何对Online Management API进行身份验证,然后从Office 365租户中检索所有Customer Engagement实例。