I was using python to get access token for Dynamics 365 Marketing. This is the code that was working for me prior to the migration of our company’s new policy to enable the MFA on the microsoft account so we need to approve the sign in from our device and enter the number to approve login from our phone.
import adal
auth_context = adal.AuthenticationContext("https://login.microsoftonline.com/common")
token_response = auth_context.acquire_token_with_username_password(https://xxxx.xxx.dynamics.com/", username, password, client_id)
Access_Token = token_response["accessToken"]
However, when I run this now I get the error "AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access"
. Also, I don’t have any admin privileges to change anything in the azure portal and I don’t have client secret and there is no way to obtain it from the IT team as they don’t provide that. How can I get the access token in this scenario without client secret?