If we use selenium webdriver to automate Edge without any arguments, it will create a new profile every time instead of using the existing user data profile. That's why it asks for credential every time.
As a workaround, you can use user-data-dir and profile-directory to use specific profile to launch Edge using Selenium WebDriver. You can use the profile that stores the credential so that it won't ask for credential when you automate Edge. I think in your case it's the default Edge profile.
You need to install the MS Edge Selenium tools using command pip install msedge-selenium-tools selenium==3.141 then refer to the sample code below:
from msedge.selenium_tools import Edge, EdgeOptions
edge_options = EdgeOptions()
edge_options.use_chromium = True
#Here you set the path of the profile ending with User Data not the profile folder
edge_options.add_argument("user-data-dir=C:\\Users\\username\\AppData\\Local\\Microsoft\\Edge\\User Data");
#Here you specify the actual profile folder
edge_options.add_argument("profile-directory=Profile 2");
driver = Edge(options = edge_options, executable_path = r"C:\_path_to_driver_\msedgedriver.exe")
driver.get('https://www.google.com')
Note: Change the paths in the code to your owns.
If you don't know the path of the specific profile, you could check edge://version/ like below:
