Teams: App policy adding app to every team - microsoft-teams

is there an option to make a policy or running an powershell command to add a specific app to ever Team.
My problem:
In my School ther are a lot of Teams (100 or so). Now we want to add an App (Sharepoint Document Libary)
to every to a specific channel whithin an team, so the students can use it. Is there an easy or do i have to add it manually to every Team?

You can use Graph APIs to automate this. Use Add a tab Graph APIs to configure new tab to your channel. Please take a look at example on how to Configure Document library tab.
POST https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/tabs
{
"displayName": "Document%20Library1",
"teamsApp#odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.files.sharepoint",
"configuration": {
"entityId": "",
"contentUrl": "https://microsoft.sharepoint.com/teams/WWWtest/Shared%20Documents",
"removeUrl": null,
"websiteUrl": null
}
}

Related

Teams tab disappears

I'm developing a teams app (tab). Use manifest like this (the app is available in a team, chat, and in a meeting)
"configurableTabs": [
{
"configurationUrl": "https://.....",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupchat"
],
"context":[
"channelTab",
"privateChatTab",
"meetingSidePanel",
"meetingStage"
]
}
],
The problem is, when I add a tab to a MEETING, it disappears after a few seconds after being added (!!!) o_O. That is, I add the tab; the tab stays visible in the meeting for something like 5 seconds, and then it just disappears, and then the default meeting tab is activated.
Also, the app is not shown in the "add an app", but displayed in the generic list:
Is there some setting I'm missing? Should the application be published to behave normally in the meeting? When I add the same app to a chat, or to a team, everything works as expected. Any help is appreciated.
Like suggested above by #Meghana-MSFT, adding meetingChatTab solved the issue.
Found related note here:
https://blog.thoughtstuff.co.uk/2021/01/how-to-turn-a-teams-tab-into-a-in-meeting-side-bar/
Gotcha! – There seems to be a bug at the moment, where an application needs to have the “meetingChatTab” context added, otherwise it won’t show up in the final Add a tab dialog. So, even if you don’t want your application to interact via the chat tab, it looks like you have to add it for now. This feels like a bug so I would also keep an eye on this as I would expect this requirement to be removed in the future.

How to properly implement and test homepage in editor (Docs) addon

I am creating Google Workspace Editor add-on for Docs and Slides. My add-on is rejected by Google Workspace Marketplace team with message No homepage card is provided for the host app: Google Slides/Docs
According to documentation the homepage card is optional, therefore I initially did not implement it as my addon has no sense outside to document or slide.
https://developers.google.com/apps-script/add-ons/editors/gsao/building-editor-interfaces?hl=en#accessing_the_add-on_ui
Now I am trying to add it in appscript.json:
{
"addOns": {
"common": {
"homepageTrigger": { "enabled": true, "runFunction": "onHomepage" },
...
}
And my onHomepage trigger is not called when I run the add-on functions or install it.
Please advise on where the homepage is displayed in Docs/Slides and how to test this function.

Adaptive Card Action.OpenUrl not working for certain URLs in Microsoft Teams bot

I am working on a Microsoft Teams chat bot using Microsoft Bot Framework. The bot sends an Adaptive Card containing some text and the following Action:
{
"type": "ActionSet",
"actions": [
{
"type": "Action.OpenUrl",
"title": "View in dashboard",
"url": "${url}"
}
]
},
The URL is of the following form (edited to remove identifying info):
https://internaldomain.net/dashboard/share/134590h9?overrides=[{"query":"//dataSources","key":"account","replacement":"accountName"},{"query":"//*[id='Cluster']","key":"value","replacement":"clusterId"},{"query":"//*[id='NodeId']","key":"value","replacement":"nodeId"},{"query":"//*[id='ContainerId']","key":"value","replacement":"containerId"}]&globalStartTime=1591552800000&globalEndTime=1592460000000&pinGlobalTimeRange=true
The URL is generated and passed into the url property using a JSON templating library, and I can print the URL in the console so I know it is set properly. Also, I can run the bot in the Emulator and open the link that way. However, when I run the bot in Teams and try to open the same exact link by clicking the action button, nothing happens. If I change what URL is passed in, e.g. using https://internaldomain.net/dashboard, the link works correctly.
One thought is that the generated URL is formatted improperly so Teams doesn't recognize it or open it. But I can paste it into a browser and it opens properly.
Another thought is that the URL length (almost 500 chars) exceeds some limit for Adaptive Cards, but I haven't been able to find any info about that in the documentation or online.
I would appreciate any other ideas about what might be causing this.
Thanks!
It looks like you're needing to encode the urls before embedding them - probably the {"query" etc. is conflicting with the final Json. It looks like you're using .Net, so you could call WebUtility.UrlEncode, on everything from "?" onwards (i.e. "?overrides...")

how to add privacy policy in manifest for my app in ms teams

I need to add a text as a privacy policy in the manifest. Where shall I add it in the manifest?
{
"developer": {
"name": ,
"websiteUrl": ,
"privacyUrl": ,
"termsOfUseUrl":
},
"description": {
},
"permissions": ["identity", "messageTeamMembers"],
"validDomains": [
"contoso.com",
"token.botframework.com"
]
}
How can i update this section?
#Anu The privacyUrl only accepts a URL. You cannot add a plain text as privacy policy in the manifest.
Are you using the App Studio tool from Microsoft? It's an app that installs directly into Teams itself, to help with various Teams development tasks, and one of these is to provide a nice graphical interface to create and edit your app manifest. In this tool you can capture the url to your privacy policy, wherever it is hosted (to confirm, it does need to be a url to a page hosted somewhere).
In the final manifest, if you do want to edit it by hand rather, it would look something like this:
"privacyUrl": "[your web address to your own policy goes here]",

How do I get a list of hidden applications a user has access to?

In the Okta UI there's an option to hide applications from the dashboard, which is exactly what we want. There are some applications we want hidden in the Okta dashboard, but available in our custom applications.
But when we hide them from the dashboard, they also disappear from the list of a user's application links when pulling the user info from the API.
Any help on how to accomplish our task?
Seems like a bug. I would open up a ticket with Okta Support. A colleague of mine verified the same behavior.
As per http://developer.okta.com/docs/api/resources/users.html#get-assigned-app-links you should get a JSON object with hidden set to false.
This is indeed a bug. As of next week in PREVIEW, a GET call will return all apps regardless of whether they're hidden in the UI. Within the JSON body, two property attributes determine whether the apps are hidden in the web and/or in Okta mobile.
{
"visibility": {
"autoSubmitToolbar": false,
"hide": {
"iOS": false,
"web": false
},
"appLinks": {
"mc": true
}
}
}

Resources