Created
February 27, 2021 17:07
-
-
Save fabianwilliams-zz/ca961ae513ac22f9f6c58ad7208b96b0 to your computer and use it in GitHub Desktop.
Graph Connector: Create Connection, Schema, and Index for our Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "AdaptiveCard", | |
"version": "1.0", | |
"body": [ | |
{ | |
"type": "ColumnSet", | |
"columns": [ | |
{ | |
"type": "Column", | |
"width": 1, | |
"items": [ | |
{ | |
"type": "Image", | |
"url": "{image}", | |
"size": "Large", | |
"horizontalAlignment": "Left" | |
} | |
], | |
"spacing": "None" | |
}, | |
{ | |
"type": "Column", | |
"width": 9, | |
"items": [ | |
{ | |
"type": "TextBlock", | |
"text": "[{productname}]({producturl})", | |
"color": "Accent", | |
"size": "Medium", | |
"weight": "Bolder", | |
"maxLines": 3 | |
}, | |
{ | |
"type": "TextBlock", | |
"text": "{Description}", | |
"wrap": true, | |
"maxLines": 3, | |
"spacing": "Medium" | |
} | |
], | |
"horizontalAlignment": "Center", | |
"spacing": "Medium" | |
} | |
], | |
"spacing": "None" | |
} | |
], | |
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | |
"$data": { | |
"description": "Marketing team at Contoso.., and looking at the Contoso Marketing documents on the team site. This contains the data from FY20 and will taken over to FY21...Marketing Planning is ongoing for FY20..", | |
"image": "https://searchuxcdn.blob.core.windows.net/designerapp/images/long-stock-image.png", | |
"producturl": "https://modernacdesigner.azurewebsites.net", | |
"productname": "Contoso Research Memo" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "FabsDemoFilesDriveAlpha", | |
"description": "Index my hard drive network share demo", | |
"id": "fabsdemofilesdrivealpha" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"baseType": "microsoft.graph.externalItem", | |
"properties": [ | |
{ | |
"name": "uniqid", | |
"type": "String", | |
"isSearchable": "false", | |
"isRetrievable": "false", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "producturl", | |
"type": "String", | |
"isSearchable": "false", | |
"isRetrievable": "true", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "productname", | |
"type": "String", | |
"isSearchable": "true", | |
"isRetrievable": "true", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "retailprice", | |
"type": "String", | |
"isSearchable": "false", | |
"isRetrievable": "true", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "discountedprice", | |
"type": "String", | |
"isSearchable": "false", | |
"isRetrievable": "true", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "image", | |
"type": "String", | |
"isSearchable": "false", | |
"isRetrievable": "true", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "description", | |
"type": "String", | |
"isSearchable": "true", | |
"isRetrievable": "true", | |
"isQueryable": "false" | |
}, | |
{ | |
"name": "brand", | |
"type": "String", | |
"isSearchable": "false", | |
"isRetrievable": "true", | |
"isQueryable": "true" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@odata.type": "microsoft.graph.externalItem", | |
"acl": [ | |
{ | |
"type": "user", | |
"value": "your-user-GUID-here-347aac675901", | |
"accessType": "grant", | |
"identitySource": "azureActiveDirectory" | |
} | |
], | |
"properties": { | |
"uniqid": "{{uniqid}}", | |
"producturl": "{{producturl}}", | |
"productname": "{{productname}}", | |
"retailprice": "{{retailprice}}", | |
"discountedprice": "{{discountedprice}}", | |
"image": "{{image}}", | |
"description": "{{description}}", | |
"brand": "{{brand}}" | |
}, | |
"content": { | |
"value": "Error in gateway...", | |
"type": "text" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WHAT: This is a Gist for an end to end scenario demo and blog to create and consume a Microsoft Search Graph Connector
WHO: the user persona in the Index Json above represents a user in your active directory that you want to have access to this data
WHEN: you will be setting this up after you have created your App Registration in Azure AD. See order of operations below
WHERE: you will be doing this anywhere you can fire off an API, for simplicity sake you can do this in Postman but you can do this from your own published Web API service
WHY: because you are here to learn
HOW: see my blog post for details
Order of Operations