How to get Permission for getting UUID in Android Marshmallow

I am using and I want to get uuid.

It is getting UUID if the android version is 5 or below but in new Android version it is giving me “undefined” UUID.

How to get permission for getting UUID in marshmallow.If I enable OEM in settings it is getting UUID.
Who to automatically enable OEM in android ?

What does that mean?