Update main.yml #9
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: Test Federated Credential CLI for Microsoft 365 | |
on: | |
workflow_dispatch: | |
push: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
test: | |
name: 'Test' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 'Install CLI' | |
run: "npm install @pnp/cli-microsoft365@next -g" | |
- name: 'Get version' | |
shell: pwsh | |
run: "m365 version 2>&1" | |
- name: 'Connect using Federated Identity' | |
run: "m365 login --authType federatedIdentity --appId 5d245710-1423-4796-a1b6-da0620a85ac6 --tenant f49f84a7-ab01-4bb1-a232-f493dc13d988" | |
- name: 'Get status' | |
run: "m365 status" | |
- name: 'Get some info' | |
shell: bash | |
run: | | |
m365 spo set --url https://blimped.sharepoint.com | |
m365 spo site get --url https://blimped.sharepoint.com/sites/learning | |
- name: 'Get some info' | |
shell: pwsh | |
run: | | |
m365 cli config set --key errorOutput --value stdout | |
m365 version | |