Forum Discussion
Custome app in left navigation - deeplink to different sharepoint pages?
Hi
I have this custome app (manifest)
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"version": "1.0.0",
"manifestVersion": "1.16",
"id": "8bf7ccfe-406b-4129-a504-f406901ae8c5",
"packageName": "com.package.name",
"name": {
"short": "Heaven",
"full": "Heaven"
},
"developer": {
"name": "MyCompany",
"mpnId": "",
"websiteUrl": "https://www.mycompany.com",
"privacyUrl": "https://www.mycompany.com",
"termsOfUseUrl": "https://www.mycompany.com"
},
"description": {
"short": "Heaven",
"full": "Heaven"
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#ffffff",
"staticTabs": [
{
"entityId": "091a285d-5536-42b5-94c8-94a4060efb79",
"name": "Heaven",
"contentUrl": "https://mycompany.sharepoint.com/sites/Intranat",
"websiteUrl": "https://mycompany.sharepoint.com/sites/Intranat",
"scopes": [
"personal"
],
"context": [
"personalTab"
]
},
{
"entityId": "about",
"scopes": [
"personal"
]
}
],
"validDomains": [
"mycompany.sharepoint.com"
],
"isFullScreen": true,
"defaultGroupCapability": {}
}
The app works. If i install it and open it, it points to and opens https://mycompany.sharepoint.com/sites/Intranat
That is great!!
But now i want to deeplink on that specific sharepoint site (https://mycompany.sharepoint.com/sites/Intranat) to a specific page like this for example: https://mycompany.sharepoint.com/sites/Intranat/SitePages/MyPage.aspx
After reading the documentation i figured out it should be like this:
https://teams.microsoft.com/l/entity/8bf7ccfe-406b-4129-a504-f406901ae8c5/091a285d-5536-42b5-94c8-94a4060efb79/webUrl=https%3A%2F%2Fmycompany.sharepoint.com%2Fsites%2FIntranat%2FSitePages%2FMyPage.aspx
This URL opens the app and the correct tab in the app. But it does not go to the specified webUrl.
How do i make the deeplink to the specific page in sharepoint?
6 Replies
- LeonPavesicSilver Contributor
Hi oskarkuus,
To generate a deep link to a specific SharePoint page in your custom Microsoft Teams app, follow these steps:
Obtain the URL of the SharePoint page you want to link to, for example: https://mycompany.sharepoint.com/sites/Intranat/SitePages/MyPage.aspx.
URI encode the SharePoint URL, replacing any special characters with their encoded values. You can use online tools for this encoding.
Construct the deep link for your Teams app. The format is https://teams.microsoft.com/l/entity/<AppId>/<EntityID>. Replace <AppId> with your app's ID and <EntityID> with the ID of the tab within your app.
For example: https://teams.microsoft.com/l/entity/8bf7ccfe-406b-4129-a504-f406901ae8c5/091a285d-5536-42b5-94c8-94a4060efb79
Append the encoded SharePoint URL as a query parameter named webUrl to the deep link. Ensure the query parameter is properly formatted.
This composed URL should open your app in Microsoft Teams and navigate directly to the specified SharePoint page.
- oskarkuusBrass Contributor
Thank you.
But that is how i think i just wrote how i have done
https://teams.microsoft.com/l/entity/8bf7ccfe-406b-4129-a504-f406901ae8c5/091a285d-5536-42b5-94c8-94a4060efb79?webUrl=https%3A%2F%2Fmycompany.sharepoint.com%2Fsites%2FIntranat%2FSitePages%2FMyPage.aspxThis URL is :
https://teams.microsoft.com/l/entity/<appID>/<entityId>?webUrl=https%3A%2F%2Fmycompany.sharepoint.com%2Fsites%2FIntranat%2FSitePages%2FMyPage.aspxAnd according to your guide i think this should be correct?
What am i doing wrong?
- LeonPavesicSilver Contributor
Hi oskarkuus,
it seems you've already tried the correct approach but I would still recommend to check:SharePoint Page Access:
- Verify that users have the necessary permissions to access the specific SharePoint page you're linking to. Insufficient permissions could prevent the deep link from working as expected.