Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
View changes to roles using PowerShell
April 23, 2016
Q. How can I view all role assignment changes over a period of time?
A. The PowerShell below will show all role assignment changes that have occured over the past 7 days. You can modify the time of the search by changing the PowerShell to the desired time range.
Get-AzureRMAuthorizationChangeLog -StartTime ([DateTime]::Now - [TimeSpan]::FromDays(7)) | FT Caller,Action,RoleName,PrincipalType,PrincipalName,ScopeType,ScopeName
Below is an example execution:
PS C:> Get-AzureRMAuthorizationChangeLog -StartTime ([DateTime]::Now - [TimeSpan]::FromDays(7)) | FT Caller,Action,RoleName,PrincipalType,PrincipalName,ScopeType,ScopeNameCaller Action RoleName PrincipalType PrincipalName ScopeType ScopeName------ ------ -------- ------------- ------------- --------- [email protected] Granted User James Bond Subscription [email protected] Revoked User James Bond Subscription 466c1a...
You May Also Like