Bug report: Unable to deploy spfx app
See original GitHub issueDescription
Hello,
I am unable to add spfx package via m365 cli. I can get site details with m365 spo web get --webUrl $siteUrl
Am I doing somethin wrong? Permissions are added and approved by global admin.
Steps to reproduce
m365 login --authType certificate --certificateBase64Encoded $base64 --password $password --appId $appid --tenant $tenantID
m365 spo app add -p $pathPackage --overwrite --scope sitecollection --appCatalogUrl $siteUrl
Expected results
App added
Actual results
node.exe : Error: Request failed with status code 403
Diagnostics
Request error: { “url”: “https://graph.microsoft.com/v1.0/sites/root?$select=webUrl”, “status”: 403, “statusText”: “Forbidden”, “headers”: { “transfer-encoding”: “chunked”, “content-type”: “application/json”, “vary”: “Accept-Encoding”, “strict-transport-security”: “max-age=31536000”, “request-id”: “d85ef4e3-c2d7-45a8-a7f3-b90405b2770f”, “client-request-id”: “d85ef4e3-c2d7-45a8-a7f3-b90405b2770f”, “x-ms-ags-diagnostic”: “{"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"005","RoleInstance":"AM4PEPF00015143"}}”, “date”: “Mon, 07 Mar 2022 21:08:29 GMT”, “connection”: “close” }, “error”: { “error”: { “code”: “AccessDenied”, “message”: “Either scp or roles claim need to be present in the token.”, “innerError”: { “date”: “2022-03-07T21:08:29”, “request-id”: “d85ef4e3-c2d7-45a8-a7f3-b90405b2770f”, “client-request-id”: “d85ef4e3-c2d7-45a8-a7f3-b90405b2770f” } } } } Error: Request failed with status code 403
CLI for Microsoft 365 version
v5.0.0
nodejs version
v14.17.6
Operating system (environment)
Windows
Shell
Windows PowerShell
cli doctor
{ “os”: { “platform”: “win32”, “version”: “Windows 10 Pro”, “release”: “10.0.19044” }, “cliVersion”: “5.0.0”, “nodeVersion”: “v14.17.6”, “cliAadAppId”: “a72e0e71-fff2-4b28-acf8-808422dd8ff9”, “cliAadAppTenant”: “single”, “authMode”: “Certificate”, “cliEnvironment”: “”, “cliConfig”: {}, “roles”: [ “User.Read.All”, “Sites.Manage.All”, “Sites.Read.All”, “Sites.FullControl.All” ], “scopes”: [] }
Additional Info
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
No problem. I’ll close this issue for now but if you ever get a chance to test it and could get back to us, I’d appreciate it.
Unfortunatly, I am not able to test it right know. I don`t enough permissions to assign Microsoft Graph permissions to my app registration.