Open derelict opened 3 years ago
We'll need to have a test setup to be able to do this, not sure if @fdurand has something we can use.
I forgot to pay the 1000$ Azure licence to manage my unique user. If you have the attribute that contain the wire mac address then it will help.
I forgot to pay the 1000$ Azure licence to manage my unique user.
But like don't you work at Inverse? Should have the cash-money to pay for that
Isn't that @lzammit on the left by any chance ?
Seems like this is not part of the v1.0 API yet ...
But Beta does provide this:
but a quick test (again i maybe know 0.5% perl ;-) ) seemed like the api returns "null" for ethernetMacAddress :
Nov 25 15:46:52 nac packetfence_httpd.portal: httpd.portal(32076) ERROR: [mac:nn:nn:nn:nn:nn] Got error code {"@odata.context":"https://graph.microsoft.com/beta/$metadata#deviceManagement/managedDevices(ethernetMacAddress,complianceState)","@odata.count":1,"value":[{"ethernetMacAddress":null,"complianceState":"noncompliant"}]} when contacting the Graph API. Here's the response body : (pf::provisioner::intune::decode_response)
I created a patch that will read the ethernet MAC if its there (while keeping in mind that it might not be there if its only in the BETA API)
Apply it using:
cd /usr/local/pf/
curl https://github.com/inverse-inc/packetfence/compare/feature/intune-ethernet-mac.diff | patch -p1
/usr/local/bin/pfcmd service pf restart
If the field is there, it will use it, otherwise it won't do more than what it does today.
Let me know how it goes
Did this patch work ? If so I'd like to integrate it into our code
give me some time to check it ;-)
are you "sure" that the v1.0 API does provide the ethernetMacAddress at all ? (See my Post above)
I'm not but if its there then it will work. Since I don't have access to Intune, using you as a guinea pig is pretty much my only option :)
Is your feature request related to a problem? Please describe. Yes. The Intune Provisioner only checks against the wifimacaddress on the intune device object. Therefore validation for Ethernet Devices (Notebooks with Ethernet Connection) can not get validated
Describe the solution you'd like Check wifi and/or ethernet mac address depending on the connection type.
Describe alternatives you've considered Alternatively check both mac addresses if connection type can not be taken into account at that time.
Additional context none