determine WPA2 enterprise EAP type for existing wifi network

Jeff 1 Reputation point
2021-12-04T04:12:18.303+00:00

I have working code using wlanapi that connects to a WPA2 enterprise wifi network using EAP type 21, EAP-TTLS. However, this obviously won't work for wifi networks with other EAP types. How can the EAP type be determined programmatically for an existing wifi network?

The windows 10 OS is able to do this: When you first connect, a profile is created. Using the netsh command line utility the profile XML can be exported to a file, where the correct EAP type can be found.

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,931 Reputation points
    2021-12-08T17:00:40.41+00:00

    Hello @Jeff

    maybe this discussion will help you to go further to reach your goal:

    [C#] How to set programmatically EAP-Method information for Wifi profiles
    https://social.msdn.microsoft.com/Forums/en-US/062781f5-3012-46e5-a68e-82a46ad94163/c-how-to-set-programmatically-eapmethod-information-for-wifi-profiles?forum=csharpgeneral

    Hope this helps with your query!

    -------
    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. Jeff 1 Reputation point
    2021-12-08T21:28:40.883+00:00

    Thanks for the link. Although it's for a different issue, it led me to the EAPhost API (https://learn.microsoft.com/en-us/windows/win32/eaphost/portal). I'll reply once I determine if it will suffice or not.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.