我正在使用 C# 上的新 MIP SDK 构建 POC 应用程序。要求之一是使用存储在服务器上的用户名/密码。所有示例应用程序都使用 OAuth2 登录,并带有一个用于用户凭据输入的弹出窗口。我相信正确实施 IAuthDelegate 可能会有所帮助,但内嵌文档并没有多大帮助。在我的引擎初始化方法中,我正在关注 SDK 示例
var authDelegate = new AuthDelegateImplementation(appInfo);
//Initialize and instantiate the File Profile
//Create the FileProfileSettings object
var profileSettings = new FileProfileSettings(
path: "mip_data",
useInMemoryStorage: true,
authDelegate: authDelegate,
consentDelegate: new ConsentDelegateImplementation(),
applicationInfo: appInfo,
minimumLogLevel: LogLevel.Trace);
Console.WriteLine("Load the Profile async and wait for the result");
var fileProfile = Task.Run(async () => await MIP.LoadFileProfileAsync(profileSettings)).Result;
Run Code Online (Sandbox Code Playgroud)
和 AuthDelegateImplementation 具有以下代码
public string AcquireToken(Identity identity, string authority, string resource)
{
AuthenticationContext authContext = new …Run Code Online (Sandbox Code Playgroud) 我正在构建一个可以在 Windows 计算机上自动标记 Office 文件的应用程序。要以编程方式将我的敏感度标签应用于文档,Microsoft 告诉我使用其MIP SDK。
但 SDK 是用 C++ 编写的,有一些复杂的异步观察者模式,所以我不清楚如何从 Python 调用它的函数。
有人成功地将 MIP SDK 与 Python 3 结合使用吗?您能分享一个在文件上调用该函数的具体 Python 示例吗?SetLabel()
c++ python-3.x microsoft-information-protection mip-sdk microsoft365
microsoft-information-protection ×2
c# ×1
c++ ×1
login ×1
microsoft365 ×1
mip-sdk ×1
python-3.x ×1
sdk ×1