Microsoft scope setup Error- Actiivty O365 Properties Panel

I am setting up microsoft office 365 scope and i want to send email using this scope.

Authentication type for activity i am supposed to use : AplicationandSecret

my flow:

get credentials for Application ID - > value stored in variable (App_ID)
get credentials for Tenant ID → value stored in variable (Tenant_ID)
get credentials for Application_Secret-> value stored in variable (App_Secret ID)

now when i pass this variable in the prorperty panel the conversion of secure string is not proper

because my credentials are secure string and all this variable have value of string type

Question: How to convert the value o this credentials into securestring which can be used in properties panel
and how to Assign it to my variables so they can be used ??

Hi @samantha_shah

Your question is Quite confusing could you be more specific…

Hi @samantha_shah . You can convert secure string to string datatype using following command in assign activity.
str_AppId=new System.Net.NetworkCredential(string.Empty, secstr_AppId).Password
str_AppId is string datatype and secstr_AppId is securestring …

1 Like

sure @mkankatala

my question is : I am setting up Microsoft office 365 scope and i want to send email later within this scope using send email activity.

now When we setup Microsoft O365 activity it has some properties which needs to be configured

inside the proprty panel:
I have selected → Authentication type → ApplicationandSecret

now need to pass value inside ApplicationID, TenanatID, APPSecret for the connection of scope to auth.

→ for passing the value i am using values stored in variables from my Get credential activity:

Output of Get credential activity variables contains value which we got → but the value type will be securestring

and i need to pass secure string to (ApplicationID, TenanatID, APPSecret for the connection of scope to auth.)

hoeever its an explicit conversion it wont allow me to pass the value directly using variable

for example: ApplicationID.toString 9 (inside Application ID) will pass null value

because its an explicit conversion we need to do something and thats where i need help

does it make sense now @mkankatala sir

Hi @devik

so in my case i can use assign activivty below get credential activity

then

assign → str_ApplicationId = new System.Net.NetworkCredential(string.Empty, " my variable coming from get credential").Password

is it correct ?

@samantha_shah yes. That’s right.

Okay Got it… @samantha_shah

Application ID and Tenant ID will accept String Datatype Variables, for this In orchestrator create two assets not credentials and use Get asset activity to get those values and store in a Variable.

When comes to AppSecret will accept the SecureString datatype variables, for this in Orchestrator create a asset with credential and give the value in password field in assets. Then use Get Credentials activity and create a variable in the Password field and pass that variable in the properties.

Hope it helps!!

1 Like

Hi @devik
thanks for the help but

and that string value variable can be passed inside Micrsosft office scope property here ??

it will still pass a secure string to the activity ???

HI @samantha_shah, Application Id and Tenant will not accept secure string. Only string variable has to be passed. Secure Application secret can accept secure string of Applicationsecret.

Hi @devik

yes thanks for that but our variables are of string data type right which stores our secure string value

my setup looks like this → still gives me a warning

please throw some light on it @devik it will be very helpful

Hi @mkankatala @devik
sorry the solution didnt worked actually
i have setup the followig values but still my scope has some missing thing it is giving me general exception error and wont send my email

COULD YOU PlEASE TELL WHAT AM I MISSING ?
I have used String variable for Application Id && tenant ID

and used the output of secure string App_Secret directly into secure Application Secret

in the property panel


@samantha_shah

just keep in mind:

  • from best practice viewpoint the usage of Get credential assets should be done within a scope very close to usage

  • the M O365 Scope evolved and offers functionalities within the design time, therefore we get the yellow box, when using variables for the connection ideas

Also have a look at this docu:

As the Asset approach is much recommended

For any connection issues checkout also the FirstAid

It’s not an error. It’s just warning that you have not passed the details in plain string values. If you pass in plain string and not form assets then you get more details to see in design time.

So don’t worry about the warning and try to run the workflow if you set rest everything properly.

Thanks,
Ashok :slight_smile:

HI @ashokkarale @mkankatala @devik

when i run the actvivity in debug mode and check it still wont allow me to send email to my client

str_EmailTo-> has receivers email
str_EmailCc-> has a cc email

can somebody help

is my split function wrong in the email ??

but it gives me a error at run time please see the detailed screenshot

as you can see:
grafik

similar as discussed within the above shared FirstAid

hi @ppr thanks for the first aid

but i think i am missing something in scope itself , so that connection is not allowed to my sen email activity

i will go through the first aid to check.

this you can check / correct as described within the firstAid at XAML editing

@samantha_shah Looks like str_App_ID and str_Tenant_ID are not set properly. Can you check if you have placed double quotes surrounding variable in Networkcredential function in the assign statement? If yes, please remove it.
It should be assign → str_App_ID = new System.Net.NetworkCredential(string.Empty, APP_ID).Password
Also in the error screenshot am not finding any securestringvariable to set str_Tenant_ID. From where it’s value is assigned?

1 Like

thanks it worked now , thanks for identifiying !!

1 Like

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