Azure-Samples / active-directory-b2c-advanced-policies

Sample for use with Azure AD B2C with Custom Policies.
http://aka.ms/aadb2ccustom
MIT License
217 stars 145 forks source link

Is there any method to get MAC address of the user's system using custom policies? #65

Open 1993Saurabh opened 4 years ago

1993Saurabh commented 4 years ago

Hi,

I want to uniquely identify the user's machine other than IP addresses and want to store it into the claims as well. Is there any method to get MAC address of the user's machine using the custom policies flow or is there any other way to uniquely identify the user's machine. The reason behind why I don't want to go with the IP address is that this approach cannot uniquely identify the user's machine if all the machines are on the same network let's say on an organisational network. In that case it will give me the public IP address which I don't want because public IP address will be same for all the machines inside that network.

xinaxu commented 4 years ago

This is technically not possible. MAC address is useful only in link layer and gets lost over the internet after hopping over multiple routers. Alternatively, you can rely on the cookie sent from your web application to identify unique browser sessions.