You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS应用集成Intune iOS SDK遇问题:需调用代理及请求策略吗?

Answers to Your Intune iOS SDK + ADAL Integration Questions

Hey there! Let's break down your questions and help you get that Intune SDK integration working properly.

1. Do I need to set up a delegate for ADAL when integrating the Intune SDK?

Absolutely—this is almost certainly why your initial integration didn't take effect! The Intune iOS SDK relies on intercepting ADAL's authentication requests to inject compliance checks and enforce Intune policies. Here's exactly what you need to do:

  • Create an instance of IntuneMAMADALDelegate (a class provided directly by the Intune SDK).
  • Assign this delegate to your ADAuthenticationContext using its delegate property.
  • Ensure the delegate implements the authenticationContext:willPerformHTTPRequest: method—this is the hook where Intune inserts necessary headers and validates device compliance before the auth request is sent.

Without this delegate in place, the Intune SDK can't interact with ADAL's authentication flow, so all its policy enforcement features will remain inactive.

2. If I call registerAndEnroll after successful authentication, do I still need to request policies in AppDelegate?

Yes, you should still trigger a policy request in your AppDelegate's application:didFinishLaunchingWithOptions: method, and here's why:

  • While registerAndEnroll will trigger a policy sync in the background eventually, requesting policies at app launch ensures critical compliance rules (like blocking access for non-compliant devices) are applied immediately when the app starts.
  • To do this, add a call to IntuneMAMPolicyManager.sharedInstance().requestPolicy() early in your app's launch flow.
  • Don't forget to set up an IntuneMAMPolicyDelegate to handle policy updates (using methods like policyManager:didReceivePolicy:) so your app can react to changes after enrollment is complete.

Quick Bonus Troubleshooting Tip

If you followed the initial steps but the SDK still isn't working, double-check these common pain points:

  • Confirm your app's bundle ID matches the one registered in the Intune admin center.
  • Verify your ADAL authentication request includes the necessary Intune scopes (e.g., https://graph.microsoft.com/DeviceManagementManagedDevices.ReadWrite.All).
  • Make sure you're using compatible versions of ADAL and the Intune SDK (version mismatches can break integration).

内容的提问来源于stack exchange,提问作者Savanna

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:53:41