How can I detect the availability of sp_addextendedproperty on sql server How can I find out if sp_addextendedproperty is available before trying to use it in a sql script?

I gather it's not available on Azure.

(I'm working on this bug, if you're interested).
Use OBJECT_ID to see of the object exists.  The function will return NULL if not:

IF OBJECT_ID(N'sp_addextendedproperty', 'P') IS NOT NULL
    EXEC sp_addextendedproperty ...