question

CasperRubaek avatar image
0 Votes"
CasperRubaek asked CasperRubaek commented

API Management literal string

I need to use a string like this: "<value>SharedAccessSignature sr=servicebus&sig=secret==&se=16249999999&skn=RootManageSharedAccessKey</value>

In API Management policy but I am unable to do this because the policy does not recognize the format. How can I fix this?
I need to be able to set a literal string in the policy so the policy does not consider the format of the string.
I need to use this string in a header to authorize against Service Bus.

azure-api-management
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

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered CasperRubaek commented

@CasperRubaek I suppose the problem is with the & which needs to be escape with &quot;. So you would need to write it as

<value>SharedAccessSignature sr=servicebus&quot;sig=secret==&quot;se=16249999999&quot;skn=RootManageSharedAccessKey</value>

Or use a policy expression like this

<value>@("SharedAccessSignature sr=servicebus&sig=secret==&se=16249999999&skn=RootManageSharedAccessKey")</value>
· 1
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.

I managed to set it up now using the above suggestions.

0 Votes 0 ·