Microsoft 365 Scope must provide literal value for ApplicatoinId

Respectfully request assistance in trouble shootings the issues with the classic activities using Microsoft Office 365 scope. I am currently running Studio 2023.10.3 and Microsoft 365 package 2.0.1 to upload files to various SharePoint sites owned by others. My bot has been working for the last 8 months with no issues. This is an unattended bot that uses application ID and secret as the authentication type. Today, all my bots that use this failed this morning this this message.

System exception.Code: BadRequest Message: /me request is only valid with delegated authentication flow. Inner error: AdditionalData: date: 2024-02-05T10:31:22 request-id: 7dd1676e-8efa-42a6-9479-d30cd0d2b28c client-request-id: 7dd1676e-8efa-42a6-9479-d30cd0d2b28c ClientRequestId: 7dd1676e-8efa-42a6-9479-d30cd0d2b28c at Source: SharePointUpload.xaml - Invoke Workflow File: Upload File

I only have 2 steps within the scope, both are classic. Find File and Folders, which queries for the specific folder. This outputs a DriveItem. Then Upload Files, again classic, that uploads a local file, string format, to the specific folder from the previous step.

I tried to upload to the latest Microsoft 365 package, 2.5.6, but that now gives a warning that I must provide a literal value for ApplicationId in order to use design time services. As you can see my applicationId is filled in, so I’m not understanding this. My username and password is blank as it was never required before. I tried filling the username in and all that did was upload it to my personal OneDrive and not the SharePoint site I had in the Find Files and Folders.

I’m assuming upgrading would be the preferred, but I cannot get the newer package to upload to the SharePoint site in question. Has anyone used the newest package, or a newer one and gotten this to work correctly? Any assistance would be greatly appreciated.

image

Have a look here:

it can happen, that the Scope Activity needs a manual fix at XAML level (done within an editor e.g. notepad++), due the within the package upgrade a non working XAML/XMLfragment is present

Hi @Kyle_Barton1

For more information check the below documentation

Regards

Hi @ppr,

I read and tried the first suggestion before posting this one. Entering the username uploads the file to the user names OneDrive. It does not work when I’m uploading to a SharePoint site that I don’t own. I did have to do that with other processes that read from my bots Outlook though.

On your second suggestion, how would I manually fix the xaml. I see the location of the Office365ApplicationScope, but unsure what needs to be modified.

Configure in a separate project / XAML for RnD purposes a simple scope and a simple usage
with this different package versions, but model it always fresh by the scratch

When it is working then compare

the differences between the working one and the failing one
pay attention to the line where the graph URL for the scope is mentioned

then transfere the relevant part from working one to the locations and adapt the failling one

Hi @vrdabberu,

I am using Windows. Not Windows-Legacy. Again, I’ve read all those forum post and they are not working with upload File using classic. I’ve been following along with the new activities, but I cannot get them to work using classic.

Does the classic activities no longer work with un-attended bots?

@ppr, I am doing trying and error with no avail. I can only get it to work in attended/development, not when it is published and running through orchestrator.

share your xamls details from Scope here (failling one, working one)
Or feel free to share your XAMLs (working one, faillings one)

I finally got it to work. I used the Use OneDrive & SharePoint activity with a Modern Upload Files. On the OneDrive and ScorePoint (under Classic), I chose Use Integration Service for my unattended bots account. Then on Upload Files I selected that account again. To use the modern Upload Files I had to convert my file string to iLocalResource, then to iEnumberable , following this post.

Still unsure why I can no longer use the application ID and secret that was set up in Azure last year. This, however is working for now.

As above mentioned:

  • we used ListIfo / find Files-Folders for the RnDs
  • Classic, but ensured that App Scope rights are configured correctly
  • we started with the lowest last working package version on our RnD Series
  • we created fresh XAMLs with upgraded versions (and got failings)
  • we manually fixed the failing scope XML parts with the working parts (compared the different XAMLs) and got it to work.

Explicit mention: Project Compatibility was set to Windows

However when it works now within the Integration option and you are fine with this, so it is done also.

Connection Method: Properties Panel: Variables are not supported

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.