Tuesday, 13 March 2018

Working with Graph Explorer for first time


            

       Microsoft graph is a collection of APIs available in office 365. The idea is to have a single common way for accessing communicating with all the office 365 data. At this moment sharepoint rest APIs are superior in accessing the sharepoint data, which may change in future. 

Graph explorer is an online web tool which can analyze what data is available and its responses. The graph explorer can be accessed from the URL https://graph.microsoft.io/

Once visiting the link select on the , select the "Graph Explorer" from the top navigation bar to get a screen like below.


It is showing a sample query with the URL https://graph.microsoft.com/v1.0/me/ which will return the data about the current user on clicking the "Run Query" button, since I have not used my credentials it will show a sample data. The URL text box will show a good number Graph APIs available. 

 Once I sign in with my credentials by clicking on the left side button "Sign in with Microsoft", I will be able to see my real time data, I was prompted to login with my microsoft account which will have access to the tenant.( It would be advisable to use a non global admin account, even though the graph explorer is from MS). It will ask to accept the permissions needed by the Graph Explorer.


Once logged in , I just the ran query to fetch my information and it retreived as below.

To fetch information about my site collection I ran the below API query,
syntax: https://graph.microsoft.com/v1.0/sites/{hostname}:/{sitecollection relativepath}

For example if my hostname was mytenant.sharepoint.com and site collection url was mytenant.sharepoint.com/sites/xyz then my query needs to be as below



More queries for sharepoint and other office 365 components  are available in the following msdn link

Creating App Catalog in sharepoint online

1.       If you already have office 365 account you can proceed to step 2 , if not you can set up a trial version in office 365 in the below link
This will take a couple of minutes to configure the setup, it will be showing a screen similar to this while setting up



2.       Once the SharePoint setup is done we can navigate to the Admin center by selecting the “Admin” tile on the logged in page.

3.       Once you are inside the Admin page you can open the sahrepoint admin area by selecting the “SharePoint” under “Admin Centres” in the left pane.

Or you can directly access the SharePoint Admin Center by accessing the below URL : https://{tenant}-admin.sharepoint.com

4.       Once we are inside the SharePoint Admin Center the next step will be create an App Catalog, click on the link “app” on the left panel and select the “app catalog” from the new page.



5.       This will prompt an option to create a new app catalog or use an existing app catalog. If you are already having an app catalog you can proceed to select the second option provide the URL for the same. Here I will be setting up a new app catalog.


6.        In the next window the app catalog site Title and the web URL needs to be provided along with the administrator details. My window will look like this, I have used “myApps” suffix for my app catalog site.


Clicking OK will create the app catalog in 1 to 15 minutes depending on the server details. The site can be seen in the Sharepoint Admin Center.