RESTMessageV2

R0810
Tera Expert

Hello ,

I'm trying to send attachments from my csm personal developer instance to Azure storage account. I have an application registered on the azure portal and also have a storage account created. I have registered the application created in azure on my PDI instance under Application registry as Oauth provider as below.

Riya19_0-1722863701895.png

For testing purpose I have built an after  insert BR on the attachment table . Below is the code: I'm using setAuthenticationProfile function to set OAuth and the sys_id of the oauth_entity_profile.

Riya19_1-1722863951023.png

Error shows:

Riya19_2-1722864057062.png

 

Can anyone help with the steps for authenticating via Oauth entity profile and the checks required?

On azure side the application is registered and my secret is created. API permission is added to the application as 'user.impersonation' for the storage account that I created on the azure portal.

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@R0810 

to send 1 file add this line after line 13

grAttachment.next();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader