Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

How to expire password for only few users when login to Power BI


We have set of users in the organization whose password need to be expired after few days,lets say 90 days

I understand that password expiration policy is set for all users in organization (not individually) in Org settings of Microsoft 365 admin centre.But after research I understand that it can be performed for single user in Powershell.So I followed  steps as described in below link


I downloaded and installedAzure AD  powershell module and connected to Azure AD tenant as global administrator succesfully

AFter connecting successfully  I entered this command as described in above link  for Set a password to expire


Set-AzureADUser -ObjectId <user ID> -PasswordPolicies None


I gave one of user id to test it and it went to next line and shown below.






I am not sure whether the step is successful. and what would be next steps to  set the password to expire after 90 days for that particular few users only.


Can anyone please help.








Super User
Super User

Hi @smeg ,
I feel like this is the incorrect platform for this query since this is not a Power BI specific query but organizational O365 account handling specific query.
Power BI Services just like any other microsoft application uses O365 accounts as the base of login. All the expiration policies would be handled by the IT Admins of organization. 


Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!

Helper I
Helper I

Hi,thank you for the response.Can you please let me know the steps for  how to create a group of users and set password policy,as I dont know much about powershell?

Resolver II
Resolver II

Try using this cmdLet to read the policy for the individual user you just updated.

Get-ADUserResultantPasswordPolicy (ActiveDirectory) | Microsoft Learn


For a group of users, it may be easier to create a user group and then set the password policy to the group instead of the indiviudual users.

Hi @m-colbert ,


Can you please guide or provide  me with steps in creating user group and then set password policy to that group in powershell?



Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors