Maintain control of your Microsoft 365 data
Post Reply
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

Hi,

We are submitting a restore request thru the API with modern authentication. According to the (manual)https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=40 we only need to submit the userCode.

POST URL:

Code: Select all

RestoreSessions/<restoreSessionId>/Organization/Mailboxes/<mailboxId>/Items/<itemId>/Action"
Body:

Code: Select all

{
"restoretoOriginallocation":
 {
  "userСode": "C6A9DB737"
 }
}
When we do this, we get the following response back:

Code: Select all

{result: "error", message: "Missing mandatory parameters: userName."}
Bug or manual error?

Kind regards,
Bastiaan van Haastrecht
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
nielsengelen
Product Manager
Posts: 5956
Liked: 1245 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: API restore to original location doest work with modern authentication

Post by nielsengelen »

Hi Bastiaan, did you already open up a support case for this? A userCode is all that should be needed which is correct (which you can get via POST restoreSession/{id}/organization/restoreDeviceCode). This looks like something specific to the organization or order of API calls going wrong. Let us know the support case ID once it is created for future reference.
GitHub: https://github.com/nielsengelen
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

Yes we known how to get the userCode. The organization is setup thru modern authentication.

Yes we already have an active ticket for this issue: #04398726
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

Secuence:
POST:

Code: Select all

"RestoreSessions/<rid>/organization/restoreDeviceCode"
Body:

Code: Select all

array:1 [
  "targetApplicationId" => "544d508e-c41c-4a63-bd71-18cfdeb8a1e2"
]
POST

Code: Select all

RestoreSessions/<rid>/Organization/Mailboxes/<mid>/Items/<iid>/Action

Body:
[code]
array:1 [
  "restoretoOriginallocation" => array:1 [
    "userСode" => "XXXXXXXXX"
  ]
]
Result:

Code: Select all

{result: "error", message: "Missing mandatory parameters: userName."}
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
nielsengelen
Product Manager
Posts: 5956
Liked: 1245 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: API restore to original location doest work with modern authentication

Post by nielsengelen »

Have u tried adding "targetOrganizationName" and "targetRegion" to the restoreDeviceCode request? I've done some tests here on 2 servers and it works for both when restoring a specific item. Both running the latest version 4.0.1.545.
GitHub: https://github.com/nielsengelen
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

When doing restoreToOriginalLocation for OneDrive we get an other result:

Code: Select all

{result: "error", message: "Incorrect credentials for online organization."}
When doing it thru the GUI, both OneDrive and Exchange to original location works perfectly.
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

nielsengelen wrote: Sep 24, 2020 9:20 am Have u tried adding "targetOrganizationName" and "targetRegion" to the restoreDeviceCode request? I've done some tests here on 2 servers and it works for both when restoring a specific item. Both running the latest version 4.0.1.545.
Shouldnt be needed when restoring to original location, but I will give it a try.
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

Have added those parameters, but didnt change the results.
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
nielsengelen
Product Manager
Posts: 5956
Liked: 1245 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: API restore to original location doest work with modern authentication

Post by nielsengelen »

Let's wait for insight from support then. They will require logs (from extended logging) and should be able to identify something.
GitHub: https://github.com/nielsengelen
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

Those logs are in their possession. But it's taken them a lot of time to find the issue, therefore I tought I give it a try on the forums. I guess we need to wait.
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
b.vanhaastrecht
Service Provider
Posts: 892
Liked: 170 times
Joined: Aug 26, 2013 7:46 am
Full Name: Bastiaan van Haastrecht
Location: The Netherlands
Contact:

Re: API restore to original location doest work with modern authentication

Post by b.vanhaastrecht »

Thank anyway!
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests