Tuesday, February 24, 2015

Easy way to identify Office apps and Office 365 for business mobile apps supported on different mobile devices



One of the big advantage to use Office 365 is you could access the content from different mobile devices. However, if you need to test different combinations of what apps will run on what type of devices. Microsoft does not seem to provide a list since it changes frequently every month. There is a simple way you could list Office apps and Office 365 for business mobile apps supported for different mobile devices. Here is the procedure and the list based on current O365 version as February 2015.

You could login to O365 -> Click Admin-> DASHBOARD -> Download software as indicated in the screenshot. You could use this link to go there directly.


 Click Phone & tablet and you will see all supported mobile devices as in the following screenshot.


If you need to which Office apps (Word, Excel, PowerPoint, and OneNote) or see a list of the Office 365 for business mobile apps supported for your device, click each link. Here is the list.

1. Window Phone

2. iPhone

3.Android phone
4. Android tablet
5. Window 8 tablet

6. Window RT device


7. iPad

At this time, there is no apps available to support BlackBerry and Nokia (Symbian OS). They might be supported in future release.

Tuesday, February 17, 2015

Audit log reports link not available for SharePoint Online OneDrive for business and mysite


We have identified that audit log reports link not available for SharePoint Online OneDrive for business and mysite. The same link as in the screenshot is available for other SharePoint Online sites. This seems to be an issue since we can enable the audit logs but could not  view the logs. 


We have been working with Microsoft and as described in O365 roadmap that this seems to be as designed and will be placed in different Compliance Center. User activity reports will allow you to audit SharePoint and OneDrive for Business user actions such as views, edits, deletes, downloaded files, and sharing of files. These reports will be available in the Compliance Center.
 
Well, at this time the workaround is to append the report page URL like “_layouts/15/Reporting.aspx?Category=Auditing” to the mysite or OneDrive for business site to view the reports. Here is one example to view the audit logs from my OneDrive for business site.



Tuesday, February 3, 2015

Automate Office 365 Document Library file downloading to local using CSOM

After users started to use O365, you might need to download files from O365 library to local file system The following script will be handy to automate the process.

#Add references to SharePoint client assemblies and authenticate to Office 365 site - required for CSOM
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

$siteUrl = "https://company-my.sharepoint.com/personal/userid_
company_com"
$listTitle = "Documents"
$destination = "E:\\Backup"

# Login as the user account to window server and run the following script
# read-host -AsSecureString | ConvertFrom-SecureString | out-file C:\cred.txt
# The password will be encripted to file
$o365admin = "userid@domain.
company.com"
$password = get-content C:\cred.txt | convertto-securestring
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($o365admin,$password)

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$ctx.Credentials = $credentials

#Load items
$list = $ctx.Web.Lists.GetByTitle($listTitle)
$query = [Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery()
$items = $list.GetItems($query)
$ctx.Load($list)
$ctx.Load($items)
$ctx.ExecuteQuery()
$items.Count

foreach ($File in $items) {
         Write-host "Url: $($File["FileRef"]), title: $($File["FileLeafRef"]) "
        if($File.FileSystemObjectType -eq [Microsoft.SharePoint.Client.FileSystemObjectType ]::File) {

            $fileRef = $($File["FileRef"]).ToString()
            $fileRef
            $fileInfo = [Microsoft.SharePoint.Client.File]::OpenBinaryDirect($ctx, $fileRef);
            $fileName = $destination + "\\" + $File["FileLeafRef"]
            $fileStream = [System.IO.File]::Create($fileName)
            $fileInfo.Stream.CopyTo($fileStream);
            $fileStream.Close()

        }
}

Please note this script does not handle any exception or loop through sub-folders. You could enhance it to handle them easily. You could also use different WebClient object to download file. 

In case you need a way to download ALL files from a site, you might need to get all sub-site and folders.

Automate local file uploading to Office 365 Document Library using CSOM



After users started to use O365, there will be content migration request. Typical request is to migrate local files to O365 SharePoint online library. The following script will be handy to automate the process.

#Add references to SharePoint client assemblies and authenticate to Office 365 site - required for CSOM
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

$siteUrl = "https://company-my.sharepoint.com/personal/userid_company_com"
$listTitle = "Documents"
$destination = "E:\\Backup"


# Login as the user account to window server and run the following script
# read-host -AsSecureString | ConvertFrom-SecureString | out-file C:\cred.txt
# The password will be encripted to file
$o365admin = "
userid@domain.company.com"
$password = get-content C:\cred.txt | convertto-securestring
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($o365admin,$password)


$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$ctx.Credentials = $credentials

#Load items
$list = $ctx.Web.Lists.GetByTitle($listTitle)
$query = [Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery()
$ctx.Load($list)
$ctx.ExecuteQuery()
$items.Count

Foreach ($File in (dir $destination))
{
        $fileStream = New-Object IO.fileStream($File.FullName,[System.IO.FileMode]::Open)
        $fileCreationInfo = New-Object Microsoft.SharePoint.Client.fileCreationInformation
        $fileCreationInfo.Overwrite = $true
        $fileCreationInfo.ContentStream = $fileStream
        $fileCreationInfo.URL = $File
        $Upload = $list.RootFolder.Files.Add($fileCreationInfo)
        $ctx.Load($Upload)
        $ctx.ExecuteQuery()
        $fileStream.Close()
}
 

Please note this script does not handle any exception or loop through sub-folders. You could enhance it to handle them easily.