question

bond-3854 avatar image
1 Vote"
bond-3854 asked Pawelqus-0802 answered

How to find intune assign device id from an managed android app?

How can i find intune assign device id from an managed android app running on the same device ?

Is there any interface/api available in intune android SDK which can be able to retrieve device id from app where it is running?

azure-ad-graphmem-intune-graph
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I do a quick review but seems don’t find any interface/api available in intune android SDK which can be able to retrieve device id from app, see: https://docs.microsoft.com/en-us/mem/intune/developer/app-sdk-android


1 Vote 1 ·
vipulsparsh-MSFT avatar image
1 Vote"
vipulsparsh-MSFT answered vipulsparsh-MSFT commented

@bond-3854 Currently Intune SDK does not have such option to extract the device ID from the deployed managed app itself. Can you help us with your use case and scenario for achieving this, may be we can find a different way if possible.


Normally a Device which is enrolled to intune by any user using company portal, has an inventory of that device. If you have device serial number, may be you can incorporate a functionality in app to search for enrolled devices with that user info in app and filter using serial number to get the intune device id, but this will be a long route. Your use case might help us figure out different route. Thanks.




If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.



· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am working on a VPN solution where trying to achieve NAC integration with intune (https://docs.microsoft.com/en-us/mem/intune/protect/network-access-control-integrate.).

Idea is, based on device compliance/managed/enrolled status,VPN sets its policies for the device.  

There are two parts here:
One is VPN gateway/server and other is VPN app running on managed device.

So, what I am trying to do is somehow retrieve device ID of a managed device by VPN app &  send it to VPN server, and then VPN server uses graph api to retrieve this compliance/managed status.

I can see we can use "/deviceManagement/managedDevices/" or "/users" graph api to get compliance state or other endpoint parameters but for that we need to know device ID.

GET/users/{usersId}/managedDevices/{managedDeviceId} 
or
GET/deviceManagement/managedDevices/{managedDeviceId}.
Plz let me know how can we achieve this,yes app can find device serial number.

1 Vote 1 ·

Thankyou, i got it new to graph Apis, kind of over looked "filter"
GET/deviceManagement/managedDevices?$filter=contains(serialNumber,'xxx')

0 Votes 0 ·

@bond-3854 Thats Great. Thanks for sharing.


0 Votes 0 ·
Pawelqus-0802 avatar image
0 Votes"
Pawelqus-0802 answered

I am working on a VPN app that is released in Google Play and App Store. Some of our clients deploy the app to managed devices via Intune as always on VPN. App requires managed configuration to auto login users and supports fully automated deployment. Is there any way to get uuid/ WiFi MAC / anything that uniquely identifies device from Intune SDK from within managed app?


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.