cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to get the device mac address or unique id from portal

Hi Experts,

 

I have one requirement where the client wants to capture the device mac address or some unique id.

Is there any way by which we can get that from the portal?

 

Thanks,

Amit

4 REPLIES 4
AdamP
Microsoft
Microsoft

Each portal has a unique id that can be found by adding /_services/about to the URL.  

You could also pull data from the cookie.  There is a ARRAfinity value however this is for a web app instance and each portal could have more than 1.  

AdamP_0-1603988167800.png

 

OliverRodrigues
Super User II
Super User II

hi do you need to know the client's ip address or the Portal's ip address?

 

if the Portals check the above from @AdamP that should work for you

 

if you need the client's you can use cloudfare or some other online methods:

$.get('https://www.cloudflare.com/cdn-cgi/trace', function(data) {
    console.log(data)
})

returns:

fl=52f17
h=www.cloudflare.com
ip=xxxxxxxxxxxxxx
ts=1603989108.186
visit_scheme=https
uag=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
colo=DUB
http=http/2
loc=IE
tls=TLSv1.3
sni=plaintext
warp=off
gateway=off

 

once you have this you might need to call the Portals API to store in your CDS if needed




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Anonymous
Not applicable

Hi @OliverRodrigues 

Yes, I want to get the Client Device Unique ID or Mac Id.

The approach which you mentioned will give me the IP address but that is related to the network with which the device is connected but I want to get the unique id for the device irrespective of network connection.

Basically, I want to get the device id to store in CDS to track the user activity for specific functionality.

For example, if I logged into the power apps portal using my credential from my mobile then I want to get the unique and which I will store in Entity. but if I log in to the portal from another device then it will give a different id which will store in Entity.

 

Any help will be appreciable.

 

Thanks,

Amit

Oh okay, I see what you need now. For some reason I was reading device IP and not device ID

 

My understanding is that it is not possible, exposing this information would be a security vulnerability so I don't think you will be able to meet your requirement.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,799)