简体   繁体   中英

any situation where az login using Service principal works even after secret expiry?

I have been recently added to an Azure subscription. They shared me Service principal details.. which included Application(Client) ID, tenant ID, client secret. I was able to log in successfully. But, When I checked the secret details, it's expired in the month of January 2021. Is there any situation where the Service principal works even after secret expiry?

No, It doesn't authenticate with an expired client secret and will result in AADSTS7000222 error.

在此处输入图片说明

I tested the same on Bash and Powershell (Terraform Authentication with SP) using the above shown expired secret, Both gave me the expected results as shown below:

在此处输入图片说明

在此处输入图片说明

Note: If You are still seeing the same response , try deleting that secret and create a new one with custom expiry date of 1 day and check if you can successfully login using the new expired secret. If you can with the new expired secret as well , then Please create a support request to Azure from Portal (Help+Support) for assisted guidance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM