Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: How to get the device mac address or unique id from portal

    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.

  • Community Power Platform Member Profile Picture
    on at
    Re: How to get the device mac address or unique id from portal

    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

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: How to get the device mac address or unique id from portal

    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

  • adampfau Profile Picture
    Microsoft Employee on at
    Re: How to get the device mac address or unique id from portal

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35