msintuneappsdk/sample-intune-xamarin-ios

How to correct transfer file from outlook app to another app in intune MAM policy for iOS?

JamestsaiTW opened this issue ยท 12 comments

I had developed an app, which is receiving file from outlook app in intune mam policy, but I got a problem.

When I set intune App Protection for Data protection "Send org data to other apps" to "All apps" (like as below screenshot):
image

I try to use debugging in Visual Studio, I got the length of file is right:(like as below screenshot)
image

And this file in my App can work very well.

When I set intune App Protection for Data protection "Send org data to other apps" to "Policy managed apps" (like as below screenshot):
image
I try to use debugging in Visual Studio, I got the length of file is wrong:(like as below screenshot)
image

Then this file can't work right in my app.

How to correct it for Intune App Protection for Data protection "Send org data to other apps" is "Policy managed apps"?

Hi @JamestsaiTW, is this issue occurring in the extension for your app?

Hi @Kyle-Reis, it really can't work right in the extension for my app.

But I want to know how to get right file size, when "Send org data to other apps" is "Policy managed apps". It seems Intune MAM policy will add something for the file, transfered from outlook app to my app. This something causes work wrong in the extension for my app.

Or what settings should I do for my app or Intune MAM policy?

Is there any workaround?

Hi @JamestsaiTW, does your app extension link to the Intune SDK? When this policy is configured, Intune will encrypt all data that is shared out of the application, so that only applications/extensions which link to the Intune SDK can decrypt the data. It sounds like the file is not being decrypted in your extension, possibly because it does not link to the Intune SDK. You'll need to be sure to link both the app and the extension to Intune.

Hi @Kyle-Reis , I use sharpcompress in my App. As your reply, It means I need to link sharpcompress to the Intune SDK?

BTW, My app works well in the same feature on Android.

Thanks for your reply.

Hey @JamestsaiTW, could you describe the exact scenario a bit more and explain exactly where/how things are broken? When does this issue occur? Is it when some file is being shared from another application into your application? Or is this a file that your application creates directly and attempts to display?

From the original description, it sounds like the file is being shared from Outlook. Is that sharing happening via some extension that you have implemented for your application?

Hi @Kyle-Reis, thanks for your relpy.

The following steps and screenshots are my exact scenario:
First, I open Outlook App (MAM by Intune policy).

Second, I got an email (maybe attached a normal zip file) in Outlook App and I try to open it by my app (MAM by Intune policy):
Second Step

Third, I transfer it (zip file) from outlook app to my app and unarchive it:
Third Step

When I got this error(or exception), I try to look it in Visual Studio by Debug Mode.
Now, I understand I got a different file(it's an encrypted file) in my app, so I can't unarchive it well done.

How do I solve it?

Hi @JamestsaiTW, has the IntuneArchiver app successfully been enrolled in Intune MAM with the same account as Outlook?

I think it's "YES".

Or could you give me a reference or guideline? I will check it in my Intune environment.

@JamestsaiTW, is the app calling either of the Intune enrollment methods?

@Kyle-Reis Thanks for your reply. Because my app is implemented by Xamarin.Forms, I miss calling either of the Intune enrollment methods for iOS (project/App). It's work well down now, thanks!