SharePoint Online Add-In 500 Internal Server Error

As you know when we deploy app online sharepoint , we can meet 500 Internal Server error in the on-premise sharepoint error, but how about this error on the cloud based online sharepoint? On-Premise sharepoint we can check IIS Log or SharePoint Central Administration, unfortunately there are no SharePoint Central Administration or IIS Log.


HTTP 500 Internal Server Error when deploy sharepoint add-in to online sharepoint.

Which code made error

WebPartZone1.png If I added that part then , it made interanl server error, as if this web part or WebPartPages:XsltListViewPart doesn’t work well in this app.


This link is located in GitHub’s PnP explains , Developers should not simply include WebPart markup in the ASPX page itself. Doing so can cause errors when the add-in is updated.



Obviously there are some changes for sharepoint development to add-ins. It needs to check GitHub’s PnP at first, then check the book or develop my own self.




Error of SharePoint-hosted app for deployed

I have error for deploying specific simple app to sharepoint-hosted on onffice 365 environment. But I’m not sure why it happens whenever I deploy sharepoint-app like An unexpected error has occurred.





Get All Licenses users with Specific location

Hi, Today I need to calculate how many user licenses were assigned to my location.

Normally we need to know Get-MsolUser cmdlet at first.

And to see get-msoluser properties in the office 365 environment, we can use Get-MsolUser | Get-Member | Out-GridView , it shows , but there are a lot users on office 365, you need to use Get-MsolUser -all | Get-Member | Out-GridView

GetMsolUser This case to get “Get-MsolUser” properties, I must use -all parameter, it shows below, Today I’ll  use “IsLicensed”, “UsageLocation”, “UserPrincipalName”


Let’s get license user with specific location , to export csv file with column.


LicensesUsers I just added where-object {$_.isLicensed -eq $true -and $_.UsageLocation -eq “KR”, it distinguished and filtering  nicely to csv file, there are other options to use ExportCsv outer than for statement, but this is more easy to read document even if it takes time .


If you check cmdlet properties , you can use “Get-Member” cmdlet, and in this case , check your license user counts, and please check get-msoluser properties to get results more filtering to csv file.


Sideloading of apps is not enabled on this site

If you are making a site for app developing test….In this case normally we must create using development site. But sometimes we don’t know, so that deploy specific app project, it shows Error “Error occurred in deployment step ‘Install SharePoint Add-in: sideloading apps is not enabled on this site.

Solution : It needs to activate sideloading Features on the site.But I think it is able to activate on site collection features or site features, but no matter how  I check that features on site settings, there are no features, so you must use powershell, please check this link : I am also using this powershell then I activated it


Key is below like that

$sideLoadingGuid = new-object System.Guid “AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D”
$site.Features.Add($sideLoadingGuid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None);


Then if I deploy my app to sharepoint, it is successfully deployed , but then it has problem which I’ve created.

Connect online sharepoint using powershell

When we connect online sharepoint , normal documents direct to using SharePoint Online Management Shell. OnlineManagementShell.png, but as you know that , it’s hard to make script using only this. It needs to install so as to use it, but it needs to call module.. so I will introduce how to authenticate , connect online sharepoint in my environment.


Read-Host -Prompt “Enter password to be encrypted in sharepoint online mypassword.txt” -AsSecureString | ConvertFrom-SecureString | out-file “c:\sharepoint365connect.txt” [user input password stores as secure string to the file]

$password = cat “c:\sharepoint365connect.txt”| ConvertTo-SecureString
$auth = “global_admin_account”  [get content value from txt file then convert string value]

$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist $auth,$password  [new instance of powershell credential with user id and password ]

Import-Module Microsoft.Online.SharePoint.PowerShell [load online sharepoint module]
Connect-SPOService -url -Credential $mycred [connect online sharepoint admin center]


You must input your credentials to connect sharepoint online module after then you can create , edit, sort of workings on the powershell. And there are more method to connect online sharepoint. You need to make your own method I hope.



Creating SharePoint Online SiteCollection

To create sharepoint online site collection , you need to check and use “New-SPOSite” cmdlet. It describes “creates a new site collection for the current company”, it needs to load “Import-Module Microsoft.Online.SharePoint.PowerShell ” module and authentication and connect-spo service before using create sharepoint cmdlet after remote connection via powershell.


  • Url : [Required] Specifies the full URL of the new site collection, must be in a valid managed company’s site, valid managed paths are and  for company contoso
  • Owner : [Required] : user name of the site colletion’s owner, must be user , security gorup , or email-enabled security group
  • StorageQuota : [Required] : the storage quota for this creating site collection in megabytes. It must be set lower than 1024 megabytes.
  • CompatibilityLevel, LocaleId, NoWait, ResourceQuota, Template, TimeZoneId, Title , these are optional parameters
  • Owner must be user related active directory
  • One Site Collection Quota is 1 terra bytes.

Site Creation


New-SPOSite -Url -Owner owner’s email address -Template STS#0 -Title “Dev site” -StorageQuota 5000 -CompatibilityLevel 15ShowSiteCollectioList.pngthen it can show site collection which I created using powershell.


If is easy to create site collecton using powershell like GUI creation page. And I think we need to list up Template list to create various sites, teamsite, blog, search center…


Managing your own domain to Office 365[1]

If we create my own tenant on office 365, it creates domain but this domain looks difficult to memorize it, so if you have your own domain , you can change domain easy to memorize it.

Adding a New Domain

Adding a new domain in Windows Azure Active Directory  , there are three steps

  1. Add and validate the actual domain;
  2. Configure and validate DNS records (domain purpose);
  3. Configure or add users

Add and validate the actual domain

To add a new domain we can use the New-MsolDomain cmdlet with -Name option, I did only use -Name option , but needs to -Authentication options is used to pass the type of domain, which is either Managed or Federated. if we are using ADFS with DirSync as Azure Directory Service, we are using Federated, [I will configure ‘Federated’ domain after a few days during installation of ADFS] but in this example use Managed.

New-MsolDomain -Authentication Managed -Name YSAH.ORGManagedDomain.pngWhen the domain is entered into Office 365 , it needs to be validated with the Get-MsolDomainVerificationDns cmdlet. If you use Get-Help Get-MsolDomainVerification -Full, it describes “Retrieves a list of records to configure a domain“, if we are configure on the office 365 admin portal dns page, we must set txt record or mx record to verify a new domain is mine or not. Also if you want to use Skype , Online SharePoint, etc.. it needs to set srv records to azure active directory.  I prefer to use a TXT record (DnsTxtRecord) than MX record (DnsMxRecord) to verify domain.   Get-MsolDomainVerificationDns -DomainName YSAH.ORG -Mode DnsTxtRecord , it returns txt record.GetTxtRecord.png After adding this record to public DNS which I bought that domain, must be verified using the Confirm-MsolDomain cmdlet. Confirm-MsolDomain -DomainName YSAH.ORG  , it returns AvailabilityDetails

confirmmsoldomain.png  The domain is now added to Office 365 with my test tenant ,

Configure and validate DNS records (domain purpose)

The next step in the Mircrosoft Online Portal is to configure uses and the domain purposes. i.e. used with Exchange Online and Skype Online. Based on your selections the DNS records are shows which you have to configure. If I check the status is Setup in progress (domain verified) is shown . domainverifed.pngUnfortunately it is not possible using Powershell to configure the domain purpsose, so you have to use the Microsoft Online Portal or leave it this way.

Formally you don’t have a finalized domain setup and as such you most likely will be in an unsupported configuration. The domain purpose is configured on the domain, when you use the command Get-MsolDomain | select Name, capabilities in Powershell on the domain purpose is actually shown when the domain is configured in the Microsoft Online Portal. getmsoldomain.png The differences are clearly visible. The domain is created using PowerShell, On the other hand , when you leave it this way the entire configure will work as expected, as long as you configure your public DNS with the correct entries. Frankly this configure and validate DNS record items looks difficult, so as to use Exchange Online , Skype Online , it needs to set record to public DNS entries. but I don’t know what is public DNS entries, my domain ,

New domains in Exchange Online

When you’ve added a new domain in Azure Active Directory , it is automatically added to Exchange Online as an ‘authoritative domain’.



You can use PowerShell without configuring Office 365 Admin Portal Page. Creating new domain and setting values are easy than we expected. But domain purpose is not configurable via PowerShell, I’ll check more and more “domain purpose”