my project is to use the phone to receive the data from the Bluetooth device and then send it to iot central. But sas expire after a few hours, is there any way to get long-term authorization?

Feiling Pan 40 Reputation points
2023-06-16T09:20:02+00:00

my project is to use the phone to receive the data from the Bluetooth device and then send it to iot central. But https sas acquired in this way seems to expire after a few hours, is there any way to get long-term authorization?

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
347 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 27,571 Reputation points
    2023-06-20T11:07:50.3866667+00:00

    Feiling Pan

    Is there a time limit for this value? No matter how long it takes?

    Please note that generating a SAS token with a longer duration can increase the security risk. So you should only do this if it is necessary for your scenario.

    As Roman Kiss Suggested, You can set the duration for the SAS token.

    The default value is 3600 seconds. You can set the token expiration as desired.

    For ex:

    az iot hub generate-sas-token -n myIoTHub -d myDevice --du 630720

    Hope this helps. Do let us know if you have any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments