halliba / az-pipelines-2-sharepoint

Azure DevOps extension - upload build files to SharePoint Online
GNU General Public License v3.0
9 stars 4 forks source link

Could not validate drive id - no other details #16

Open cramorr opened 7 months ago

cramorr commented 7 months ago

My task is failing with the message "Could not validate drive id" but then provides no further details:

The output of the key parts of a debug log are below

[debug]loaded 15

[debug]Agent.ProxyUrl=undefined

[debug]Agent.CAInfo=undefined

[debug]Agent.ClientCert=undefined

[debug]Agent.SkipCertValidation=undefined

[debug]tenantId=[GUIDRemoved]

[debug]clientId=[GUIDRemoved]

[debug]clientSecret=***

[debug]driveId=https://myorg.sharepoint.com/sites/myteam/Shared%20Documents

[debug]targetFolder=undefined

[debug]sourceFolder=C:\agent_work\68\a

[debug]contents=Backup.zip

[debug]conflictBehaviour=fail

[debug]cleanTargetFolder=false

[debug]flattenFolders=false

[debug]failOnEmptySource=false

Found 1 files in 'C:\agent_work\68\a'.

[debug]Files: ["Backup.zip"]

Validating drive id / url: 'https://myorg.sharepoint.com/sites/myteam/Shared%20Documents'.

[error]{}

[debug]Processed: ##vso[task.issue type=error;]{}

[debug]task result: Failed

[error]Could not validate drive id.

[debug]Processed: ##vso[task.issue type=error;]Could not validate drive id.

[debug]Processed: ##vso[task.complete result=Failed;]Could not validate drive id.

I have tried lots of different formats for the SharePoint URL e.g. trailing slashes replacing %20 with a space etc. but nothing seems to work. I think I have my client secret correct as I have tried replacing that with gobbledegook and it failed with a 401 error.

cramorr commented 5 months ago

I've had a couple of private messages about this. I still have not been able to resolve this issue.

halliba commented 5 months ago

Hi, I have to find out why the logged error is empty - currently I have no idea...

Palanikr commented 5 months ago

Hi @halliba, Do we have to add azure ad client id, tenant id and client secret id in sharepoint online too?