I run web app in azure app service, where I need to get Authenticated Users(via Azure AD) Password Expiry Details.
How to get password policy for Azure Active Directory logged in user
I follow above answer and I got it working on Local visual studio.
However Now this code is deployed on Azure App Service and it throws. "Connect-MsolService" is not defined cmdlet...
When I got this error on local, it was because Azure AD Powershell module requires to be run on 64 bit environment. So I checked following checkbox in Visual Studio Tools->Options->Projects & Solutions->Web Projects->Use 64 bit version of IIS Express.. That was it and it worked on local.
As it needs 64 bit. I have also checked Azure Web App->Application Settings->Platform to 64bit (Default is 32 bit)
Still the same error of "Unknown cmdlet"
Anyone experienced this before.