我正在尝试使用 MIP SDK 设置标签。但是,在执行 AddEngineAsync 时,我收到拒绝访问错误。我能够从 AAD APP 获取访问令牌。任何帮助都会很棒。
代码:
var engine = Task.Run(async () => await profile.AddEngineAsync(engineSettings)).Result;
错误:
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> Microsoft.InformationProtection.Exceptions.AccessDeniedException: The service didn't accept the auth token. Challenge:['']
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MipSdkDotNetQuickstart.Action.<>c__DisplayClass10_0.<<CreateFileEngine>b__0>d.MoveNext() in C:\Users\wb561362\Mip_ServicePrincipalAuth\mip-sdk-dotnet-file-SPA\Action.cs:line 178
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at MipSdkDotNetQuickstart.Action.CreateFileEngine(Identity identity) in C:\Users\wb561362\Mip_ServicePrincipalAuth\mip-sdk-dotnet-file-SPA\Action.cs:line 178
at MipSdkDotNetQuickstart.Action..ctor(ApplicationInfo appInfo) in C:\Users\wb561362\Mip_ServicePrincipalAuth\mip-sdk-dotnet-file-SPA\Action.cs:line 113
at MipSdkDotNetQuickstart.Program.Main(String[] args)