Add an app to the teams - team tab #1730
Unanswered
SanthoshAtMunichRe
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are getting the below error when we ran the Add-PnPTeamsTab commandlet
Add-PnPTeamsTab -Team "$groupId" -Channel $channel.Id -DisplayName "Settings" -Type Custom -TeamsAppId $app.Id
"Add-PnPTeamsTab : App id xxxxxx needs to be installed to the scope xxx:xx:xxx@xxx.xx and be in an unblocked state to install/update a tab At line:76 char:6 + ... Add-PnPTeamsTab -Team "$groupId" -Channel $channel.Id -Di ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Add-PnPTeamsTab], PSInvalidOperationException + FullyQualifiedErrorId : InvalidOperation,PnP.PowerShell.Commands.Graph.AddTeamsTab"
Looks like to we need to add the app into teams first as we have like below in pnp js and run the above code to place the app in the tab,
import { graphfi, SPFx } from "@pnp/graph";
import "@pnp/graph/teams";
const graph = graphfi().using(SPFx(this.context));
const addedApp = await graph.teams.getById('3531f3fb-f9ee-4f43-982a-6c90d8226528').installedApps.add('https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/12345678-9abc-def0-123456789a');
Can you suggest me the equivalent commandlet in PowerShell?
Beta Was this translation helpful? Give feedback.
All reactions