question

AdamAshtamkar-4210 avatar image
0 Votes"
AdamAshtamkar-4210 asked JamesHamil-MSFT answered

Azure AD Connect - DateTime Attribute Expression

Hi there,

We have a requirement of synchronizing an attribute from AD which is a DateTime attribute.

We keep receiving errors based on the transformation that is stopping the flow from the attribute to AzureAD.

If the Flow type is direct, we receive this error: Attempt to convert invalid type to String: System.Byte[]

When I tried to use this expression:

"IIF(IsPresent([customDateTimeAttribute]),CStr(FormatDateTime(DateFromNum([customDateTimeAttribute]),"yyyyMMddHHmmss.0Z")),NULL)"

We receive this error: Error in evaluation of expression

Does anyone know which function would the correct function to use to allow the sync to AzureAD?

It seems to be an issue only for an Attribute which has the type of DateTime.

Thank you very much in advance for any assistance with this.

Regards
Adam

azure-ad-connectazure-ad-password-hash-sync
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JamesHamil-MSFT avatar image
0 Votes"
JamesHamil-MSFT answered

Hi @AdamAshtamkar-4210 , you're syncing from your on-premise AD to AAD, right? Have you looked through this document? It covers expressions pretty extensively.

Here is an example dateTime expression as mentioned: FormatDateTime([extensionAttribute1], , "yyyyMMddHHmmss.fZ", "yyyy-MM-dd")

Please let me know if you have any questions and I can help you further!

Best,
James



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.