Forum Discussion
Office 365 users information
Hi Team
I am new to Power BI. I need to create a report which can extract users informaiton e.g MFA enabled Users, Last Login information etc.
can you please guide me how can I acheive this?
I was trying to search PowerShell use with Power BI but didnt get luck. so need guidance how can I create reports for MFA Enabled Users or want to extract users information using Powershell or any other way
I dont want to use Microsoft 365 Usage Analytics
Regards
Sajid
3 Replies
- edhans
Community Champion
The following PowerShell script will extract Office 365 info with MFA status. I didn't write it, I just use it. There is a URL in the comments to the page that I found it on. It will export to CSV and PowerBI can then consume it.
############################################################### ################################################# # This script accepts 1 parameter from command console # # OutputFile - Optional - File path to save the Output CSV file # To run the script # # .\export_office_365_users_mfa_status.ps1 -OutputFile "C:\Reports\o365-users-mfa-status.csv" # # NOTE: If you don't pass an output file path, it will save the output file in your powershell working directory (".\office-365-users-without-photo.csv"). # # Author: https://www.morgantechspace.com # Version: 1.0 # Last Modified Date: 14/06/2018 # Last Modified By: Morgan ############################################################### ################################################# Connect-MsolService #Accept input parameters Param( [Parameter(Position=1, Mandatory=$false, ValueFromPipeline=$true)] [string] $OutputFile ) #Set default output file path if not passed. if ([string]::IsNullOrEmpty($OutputFile) -eq $true) { $OutputFile = ".\o365-users-mfa-status.csv" } $Result=@() $users = Get-MsolUser -All $users | ForEach-Object { $user = $_ if ($user.StrongAuthenticationRequirements.State -ne $null){ $mfaStatus = $user.StrongAuthenticationRequirements.State }else{ $mfaStatus = "Disabled" } $Result += New-Object PSObject -property @{ UserName = $user.DisplayName UserPrincipalName = $user.UserPrincipalName MFAStatus = $mfaStatus } } #Export user details to CSV. $Result | Export-CSV $OutputFile -NoTypeInformation -Encoding UTF8 Write-Host "Report exported successfully" -ForegroundColor Yellow- sajidami82New Member
Thank you for sharing the script.
In fact, as I mentioned I am new to Power BI and dont know how to import data and create dashboards or reports in Power BI. so will you please guide me for the same.
2nd things as mostly I will work on Office365/Azure reporting in Power BI Dashboard so if you know good article or video training then please share with me for study.
Regards
Sajid
- edhans
Community Champion
You are asking a very very early question in Power BI if you are not yet clear on how to import data. I would recommend finding a good course. I teach one as a consultant at P3 Adaptive called Foundations. It is 2 days. There are others.
Yes, you can find free videos, but no free video is going to give you the comprehensiveness nor thoroughness of a paid for training. Developing a training curriculum is tough & time consuming, so good courses are not free. Quick hits on You tube are free.
You can google and find videos or blogs and see how the free works for you. Or find a reputable course and pay for it and see how much of a difference it can make.