Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

Office 365

M365 Ultimate PowerShell

Loads all Microsoft 365 cloud PowerShell modules in a single window.  No more wasted time jumping between download pages and locating various Import-Module from each product team.  Collected all here centrally to provide M365 admins with a single PowerShell PS1 to install and import every command they might need.  Enables cloud admin productivity to quickly access every command. 

Cheers! 

shades_smile

Video

Screenshot

image

GitHub Repo

References

FIXED – You can’t get there from here

With Office 365 Conditional Access Policy security applied users will see the error below when attempting to view SharePoint Online with a different browser (FireFox, Chrome, etc.).   This makes debugging front end JavaScript applications challenging without Chrome’s excellent F12 debug tools.

However, we have a fix.

Leverage Internet Explorer to obtain a valid Office 365 session and export those cookies to text.   Demo video shows exactly how to extract the “FedAuth” and “rtFa” cookies to successfully login from any web client (FireFox, Chrome, Fiddler, REST Post Man).

Cheers! 

shades_smile

Video

Error

2018-12-11_10-08-47

You can’t get there from here
This application contains sensitive information and can only be accessed from:

    ____ domain joined devices. Access from personal devices is not allowed.

The current browser is not supported, please use Microsoft Edge, Internet Explorer or Chrome to access this application.
Sign out and sign in with a different account
More details
Request Id: 910358d2-1206-4c34-93a9-f0b649d66c00
Correlation Id: cfbcaa9e-c092-7000-52c6-8ee95190c3a7
Timestamp: 2018-12-10T19:54:00.886Z
App name: Office 365 SharePoint Online
App id: 00000003-0000-0ff1-ce00-000000000000
IP address: 10.10.10.10
Device identifier: Not available
Device platform: Windows 10
Device state: Unregistered
Advanced diagnostics: Enable
If you plan on getting support for an issue, turn this on and try to reproduce the error. This will collect additional information that will help troubleshoot the issue.

References

FIXED – Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

When coding JavaScript with SP-PNP-JS I came across the error below and wanted to document for others.  Cheers! 

shades_smile

Error

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

image
image
image

Root Cause

When calling HTTP GET the default Header “accept: application/json” can return data as XML.  

Use F12 Developer Tools to view network traffic with HTTP headers and raw response text.

Solution

Modify JS code to initialize AngularJS with different HTTP headers.

Now SharePoint PNP api calls with Header “accept: application/json; odata=verbose” and returns data as JSON for correct parsing.

$pnp.setup({
	headers: {
		"Accept": "application/json; odata=verbose"
	}
});
image

References

Measure Performance – SharePoint Online (o365-speed)

PowerShell offers an excellent way to measure command line execution times with “Measure-Command” and Script Block.   With the example below, we run 10 repetitions to connect to SharePoint online and measure the response time in milliseconds.   Cheers!  

shades_smile

Video

Measure Performance – SharePoint Online (o365-speed) from Jeff Jones on Vimeo.

Source Code

Screenshots

image

References

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲