Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Office 365 CLI Setup script #10

Open
garrytrinder opened this issue Jul 22, 2020 · 12 comments
Open

Add Office 365 CLI Setup script #10

garrytrinder opened this issue Jul 22, 2020 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@garrytrinder
Copy link
Member

Provide an option for users on non Windows systems to be able to setup the Studio in their tenant.

@garrytrinder
Copy link
Member Author

Happy to help out with this one 👍🏻

@ypcode
Copy link
Collaborator

ypcode commented Jul 22, 2020

Hello Garry,

I gave it a short try a few weeks ago... but I am definitely not as proficient in bash as in PowerShell. I will push what I already have done. A helping help would indeed be really appreciated :)

Kind regards
Yannick

@ypcode
Copy link
Collaborator

ypcode commented Jul 22, 2020

I will do even better and provide a working PowerShell script using the CLI, then it would be awesome if you can give the translation in bash :)

@garrytrinder
Copy link
Member Author

Sounds like a deal 👍🏻😁

@garrytrinder
Copy link
Member Author

So I was thinking, we could create a script using CLI commands or instead we could look to add a specialist command in the CLI for the setup of this project. Thoughts?

@ypcode
Copy link
Collaborator

ypcode commented Jul 24, 2020

Hi @garrytrinder,
I think the existing commands should be sufficient.
On the other hand, dedicated commands would make it more "promoted" but I don't want to ask you too much effort on this :)

What do you think? I will work on the PowerShell script tomorrow.

@garrytrinder
Copy link
Member Author

Looking at the script you have for PowerShell, looks like we need a script to replicate the following

  • Add package to tenant App Catalog
  • Add WebApiPermissions to Microsoft Graph
  • Create Communication Site
  • Deploy app to site
  • Create Page sds2.aspx
  • Set page as welcome page
  • Add web part to page
  • Create list
  • Break permission inheritance on list
  • Add unique permissions
  • Add links to Global Navigation

Does that cover it all?

@ypcode
Copy link
Collaborator

ypcode commented Jul 25, 2020

I think that's it. Take care that it should set the permissions on the preview image library to "everyone except externals" I don't know if there an option in the CLI for that?

@garrytrinder
Copy link
Member Author

Thanks for clarifying.

If we are missing commands then we can can build them 👍🏻

@ypcode
Copy link
Collaborator

ypcode commented Jul 30, 2020

Hi @garrytrinder,

I am writing, as promised, the PowerShell version of the o365 CLI setup script and Indeed some features might be missing (or I am just not sure what command to use if there is one...

The "missing" features would be:

  • add the permissions for the SPFx app
    e.g. in the PnP Tenant Template, what is corresponding:
        <pnp:WebApiPermissions>
            <pnp:WebApiPermission Resource="Microsoft.Graph" Scope="Directory.AccessAsUser.All"/>
        </pnp:WebApiPermissions>
  • set permissions to the preview images list to everyone except external users
<pnp:Security>
    <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="false">
        <pnp:RoleAssignment Principal="{associatedmembergroupid}" RoleDefinition="Contribute"/>
        <pnp:RoleAssignment Principal="c:0-.f|rolemanager|spo-grid-all-users/{parameter:TenantId}" RoleDefinition="Read"/>
    </pnp:BreakRoleInheritance>
</pnp:Security>

Your wisdom would be really appreciated here :)

@ypcode
Copy link
Collaborator

ypcode commented Jul 31, 2020

Hi @garrytrinder , I pushed a draft of the PS1 setup script using the CLI
It is here on the dev branch: https://github.com/pnp/sp-site-designs-studio/blob/dev/setup/o365cli/setup-0365.ps1

Related to my previous comment, the are 2 missing steps so far, and it was not really tested, I pushed it only for reference so far. :)

Regards,
Yannick

@ypcode ypcode added enhancement New feature or request in progress labels Jul 31, 2020
@garrytrinder
Copy link
Member Author

Thanks @ypcode

Let me create some issues in the CLI repo to cover the missing commands to progress.

@garrytrinder garrytrinder removed their assignment Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants